-
-
Save gaybro8777/3927980127bf6c17a0bcaa11e99b2c34 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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