Skip to content

Commit

Permalink
Merge pull request #1823 from OpenC3/alert-autofix-234
Browse files Browse the repository at this point in the history
Fix code scanning alert no. 234: Prototype-polluting function
  • Loading branch information
ryan-pratt authored Jan 15, 2025
2 parents 2fcef55 + c46b698 commit a7788b7
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ function isObject(item) {
export default function merge(target, source) {
if (isObject(target) && isObject(source)) {
Object.keys(source).forEach((key) => {
if (key === '__proto__' || key === 'constructor') return
if (isObject(source[key])) {
if (!target[key] || !isObject(target[key])) {
target[key] = source[key]
Expand Down

0 comments on commit a7788b7

Please sign in to comment.