Skip to content

Commit d1dfc4b

Browse files
Potential fix for code scanning alert no. 2: Prototype-polluting function (#686)
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent ea3a569 commit d1dfc4b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/jsmind.util.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ export const util = {
7474
},
7575
merge: function (b, a) {
7676
for (var o in a) {
77+
if (o === '__proto__' || o === 'constructor' || o === 'prototype') {
78+
continue;
79+
}
7780
if (o in b) {
7881
if (
7982
typeof b[o] === 'object' &&

0 commit comments

Comments
 (0)