Skip to content

Conversation

@polarbirke
Copy link
Member

@polarbirke polarbirke commented Jan 7, 2026

No description provided.

The check `typeof obj[prop] === 'object' && obj[prop] !== null` returned `true` for DOM elements, so it tried to deep merge the element's properties into a plain `{}`, destroying the actual element reference.

The fix is to defensively only deep merge plain objects. Test added via Jest JSDom to keep an eye on this.
@polarbirke polarbirke merged commit 8ecbb75 into main Jan 7, 2026
2 checks passed
@polarbirke polarbirke deleted the fix-merge-dom-elements branch January 7, 2026 14:30
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.

2 participants