Skip to content

Fix proxy invariant crash when produce draft is returned from a getter #2690

Merged
ryansolid merged 2 commits into
solidjs:mainfrom
brenelz:fix/2668-leaked-produce-draft-proxy-invariant
May 15, 2026
Merged

Fix proxy invariant crash when produce draft is returned from a getter #2690
ryansolid merged 2 commits into
solidjs:mainfrom
brenelz:fix/2668-leaked-produce-draft-proxy-invariant

Conversation

@brenelz
Copy link
Copy Markdown
Contributor

@brenelz brenelz commented May 4, 2026

Used AI to create a fix for this.

Closes #2668

setterTraps.get in store/modifiers now bypasses internal store symbols ($PROXY, $TRACK, $NODE, $HAS) and proto, mirroring the main store proxy traps. Previously, reading $PROXY through the produce draft proxy returned a freshly wrapped draft instead of the underlying store proxy, violating the non-configurable data property invariant on the raw target.

solidjs#2668)

setterTraps.get in store/modifiers now bypasses internal store symbols
($PROXY, $TRACK, $NODE, $HAS) and __proto__, mirroring the main store
proxy traps. Previously, reading $PROXY through the produce draft proxy
returned a freshly wrapped draft instead of the underlying store proxy,
violating the non-configurable data property invariant on the raw target.
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 4, 2026

🦋 Changeset detected

Latest commit: a7959ca

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
solid-js Patch
test-integration Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Fixes a crash related to proxy invariants when a draft is produced from a getter.
@ryansolid ryansolid merged commit 75525f0 into solidjs:main May 15, 2026
1 check 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.

Browser store build can crash with a proxy invariant error when a getter returns a leaked produce draft proxy

2 participants