Skip to content

Fix setObjectProperty with invalid array paths - #5943

Merged
knolleary merged 1 commit into
node-red:mainfrom
R0CKing666:fix/5927-set-object-property-array-guard
Oct 6, 2026
Merged

knolleary merged 1 commit into
node-red:mainfrom
R0CKing666:fix/5927-set-object-property-array-guard

Conversation

@R0CKing666

Copy link
Copy Markdown
Contributor

Summary

  • Return false instead of throwing when an array path contains a null or primitive intermediate value.
  • Add regression coverage for deep set and delete operations through invalid array elements.

Testing

  • npx mocha test/unit/@node-red/util/lib/util_spec.js
  • npm run mocha:core

Fixes #5927

@knolleary
knolleary merged commit ad2f2e4 into node-red:main Oct 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Uncaught TypeError in util.setObjectProperty on Array Paths

2 participants