Skip to content

fix: reassigning to same value generates new copy with empty patches#1235

Open
oriondean wants to merge 1 commit intoimmerjs:mainfrom
oriondean:fix/858-reassign-to-same-non-primitive
Open

fix: reassigning to same value generates new copy with empty patches#1235
oriondean wants to merge 1 commit intoimmerjs:mainfrom
oriondean:fix/858-reassign-to-same-non-primitive

Conversation

@oriondean
Copy link
Copy Markdown
Contributor

Resolves #858

Temporary assignments that were later restored could still be treated as modifications, producing patches and creating new objects/arrays. This change reduces noise and work by detecting those revert-to-base scenarios early and short-circuiting them.

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.

Reassigning to the same Date object generates new copy with empty patches

1 participant