Allow sourceURL option of _.template to be falsey.

This commit is contained in:
John-David Dalton
2014-12-10 13:31:35 -08:00
parent 5500a86f0b
commit ee66e2154d
2 changed files with 39 additions and 5 deletions

View File

@@ -9208,8 +9208,11 @@
// Use a sourceURL for easier debugging.
// See http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl.
var sourceURL = 'sourceURL' in options ? options.sourceURL : ('/lodash/template/source[' + (++templateCounter) + ']');
sourceURL = sourceURL ? ('//# sourceURL=' + sourceURL + '\n') : '';
var sourceURL = '//# sourceURL=' +
('sourceURL' in options
? options.sourceURL
: ('/lodash/template/source[' + (++templateCounter) + ']')
) + '\n';
string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
interpolateValue || (interpolateValue = esTemplateValue);