We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e43bfcf commit 1530cf5Copy full SHA for 1530cf5
lib/processNested.js
@@ -21,7 +21,8 @@ module.exports = function(data){
21
let k = keyParts[index];
22
23
// Ensure we don't allow prototype pollution
24
- if (OBJECT_PROTOTYPE_KEYS.includes(k) || (ARRAY_PROTOTYPE_KEYS.includes(k) && Array.isArray(current))) {
+ const IN_ARRAY_PROTOTYPE = ARRAY_PROTOTYPE_KEYS.includes(k) && Array.isArray(current);
25
+ if (OBJECT_PROTOTYPE_KEYS.includes(k) || IN_ARRAY_PROTOTYPE) {
26
continue;
27
}
28
0 commit comments