Skip to content

Instantly share code, notes, and snippets.

@FGRibreau
Last active May 24, 2018 10:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save FGRibreau/4443308 to your computer and use it in GitHub Desktop.
Save FGRibreau/4443308 to your computer and use it in GitHub Desktop.
Add the following code just after UnderscoreJS declaration to find where _.template calls are run against empty templates.
/**
* Add the following code just after UnderscoreJS declaration to find
* where _.template calls are run against empty templates.
*/
(function(old){
_.template = function(str, data) {
if(!str){
console.error("Could not load template", new Error().stack);
return;
}
return old.call(_, str, data);
};
})(_.template);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment