Skip to content

fix(crud): use deepEqual for object change detection#606

Open
BadLice wants to merge 3 commits intoLegendApp:mainfrom
BadLice:bug/issue-410
Open

fix(crud): use deepEqual for object change detection#606
BadLice wants to merge 3 commits intoLegendApp:mainfrom
BadLice:bug/issue-410

Conversation

@BadLice
Copy link

@BadLice BadLice commented Oct 23, 2025

This PR updates src/sync-plugins/crud.ts to use deep equality (deepEqual) for comparing object values instead of reference comparison in syncedCrud.

Summary:

  • Object fields are now compared by structure, not memory reference.
  • Prevents false positives when local and remote objects have equivalent values but different references.
  • Fixes buggy sync behavior where values were detected as changed solely due to identity.

Closes #410.

Compare local and remote object values by deep equality, not reference, when reconciling fields in syncedCrud. Prevents false positives when objects are structurally equal.
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.

onSaved doesn't merge in extra values from the server on a property that is a ("deeply") nested object

1 participant