Skip to content

Commit 07511e0

Browse files
kpdeckernknapp
authored andcommitted
Fix throw when creating exception object in Safari
jquery/esprima#1290
1 parent 07c2d1a commit 07511e0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/handlebars/exception.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function Exception(message, node) {
1212
message += ' - ' + line + ':' + column;
1313
}
1414

15-
let tmp = Error.prototype.constructor.call(this, message);
15+
let tmp = Error.prototype.constructor.call(this, message, loc && loc.source, line);
1616

1717
// Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work.
1818
for (let idx = 0; idx < errorProps.length; idx++) {

0 commit comments

Comments
 (0)