Skip to content

Commit d9678a3

Browse files
committed
Cleanup for #7
1 parent 6591ef7 commit d9678a3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
'use strict';
22

3-
const hasOwnProperty = Object.prototype.hasOwnProperty;
43

54
const internals = {
65
suspectRx: /"(?:_|\\u005f)(?:_|\\u005f)(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006f)(?:t|\\u0074)(?:o|\\u006f)(?:_|\\u005f)(?:_|\\u005f)"\s*\:/
@@ -66,7 +65,7 @@ exports.scan = function (obj, options) {
6665
next = [];
6766

6867
for (const node of nodes) {
69-
if (hasOwnProperty.call(node, '__proto__')) {
68+
if (Object.prototype.hasOwnProperty.call(node, '__proto__')) { // Avoid calling node.hasOwnProperty directly
7069
if (options.protoAction !== 'remove') {
7170
throw new SyntaxError('Object contains forbidden prototype property');
7271
}

0 commit comments

Comments
 (0)