On large PRs where there are differences that say "Oops! You've got a lot of code in this diff and it couldn't load with the page. Click here to give it another chance." , addFileType breaks because the filepath has not been loaded in.
Perhaps catch and swallow if filepath is not defined.