This works fine:
var template = Handlebars.compile('{{foo}}');
template({ foo: 'bar' });
// 'bar'
This breaks:
Object.prototype[0xD834] = true;
var template = Handlebars.compile('{{foo}}');
template({ foo: 'bar' });
// throws error
This led to a very obscure bug in Istanbul: gotwarlost/istanbul#55
I haven’t looked into this yet, but it seems like the sort of bug that can be avoided by simply using hasOwnProperty checks.
Update: It may have something to do with this line: https://github.com/wycats/handlebars.js/blob/6bf9c6fc134c87dc150e485ea018c4b3f108e6b0/lib/handlebars/compiler/compiler.js#L568 params is an array, so it gets the 55348 property, which gets enumerated somewhere else, I guess.
This works fine:
This breaks:
This led to a very obscure bug in Istanbul: gotwarlost/istanbul#55
I haven’t looked into this yet, but it seems like the sort of bug that can be avoided by simply using
hasOwnPropertychecks.Update: It may have something to do with this line: https://github.com/wycats/handlebars.js/blob/6bf9c6fc134c87dc150e485ea018c4b3f108e6b0/lib/handlebars/compiler/compiler.js#L568
paramsis an array, so it gets the55348property, which gets enumerated somewhere else, I guess.