diff options
Diffstat (limited to 'tools/node_modules/eslint/node_modules/lodash/_safeGet.js')
-rw-r--r-- | tools/node_modules/eslint/node_modules/lodash/_safeGet.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/node_modules/eslint/node_modules/lodash/_safeGet.js b/tools/node_modules/eslint/node_modules/lodash/_safeGet.js index 411b062053..b070897db2 100644 --- a/tools/node_modules/eslint/node_modules/lodash/_safeGet.js +++ b/tools/node_modules/eslint/node_modules/lodash/_safeGet.js @@ -1,5 +1,5 @@ /** - * Gets the value at `key`, unless `key` is "__proto__". + * Gets the value at `key`, unless `key` is "__proto__" or "constructor". * * @private * @param {Object} object The object to query. @@ -7,6 +7,10 @@ * @returns {*} Returns the property value. */ function safeGet(object, key) { + if (key === 'constructor' && typeof object[key] === 'function') { + return; + } + if (key == '__proto__') { return; } |