mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 02:17:48 +00:00
Make compiled templates more debuggable.
Former-commit-id: aba1aa3efcea6695632aae0eb61148aa3174debd
This commit is contained in:
@@ -3421,7 +3421,11 @@
|
||||
text += '\n//@ sourceURL=/lodash/template/source[' + (templateCounter++) + ']';
|
||||
}
|
||||
|
||||
result = Function('_', 'return ' + text)(lodash);
|
||||
try {
|
||||
result = Function('_', 'return ' + text)(lodash);
|
||||
} catch(e) {
|
||||
result = function() { throw e; };
|
||||
}
|
||||
|
||||
if (data) {
|
||||
return result(data);
|
||||
|
||||
Reference in New Issue
Block a user