fix: add "no-prototype-builtins" eslint-rule and fix all occurences
This commit is contained in:
committed by
Nils Knappmeier
parent
1988878087
commit
f7f05d7558
+1
-1
@@ -59,7 +59,7 @@ describe('compiler', function() {
|
||||
Handlebars.compile(' \n {{#if}}\n{{/def}}')();
|
||||
equal(true, false, 'Statement must throw exception. This line should not be executed.');
|
||||
} catch (err) {
|
||||
equal(err.propertyIsEnumerable('column'), true, 'Checking error column');
|
||||
equal(Object.prototype.propertyIsEnumerable.call(err, 'column'), true, 'Checking error column');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
+2
-2
@@ -211,12 +211,12 @@ describe('Regressions', function() {
|
||||
// It's valid to execute a block against an undefined context, but
|
||||
// helpers can not do so, so we expect to have an empty object here;
|
||||
for (var name in this) {
|
||||
if (this.hasOwnProperty(name)) {
|
||||
if (Object.prototype.hasOwnProperty.call(this, name)) {
|
||||
return 'found';
|
||||
}
|
||||
}
|
||||
// And to make IE happy, check for the known string as length is not enumerated.
|
||||
return (this == 'bat' ? 'found' : 'not');
|
||||
return (this === 'bat' ? 'found' : 'not');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user