Skip to content

fix(Model): trigger the changeId event only if prevId is different from this.id#3147

Merged
kumilingus merged 2 commits intoclientIO:masterfrom
MartinKanera:fix/changeId-event-on-actual-change
Jan 26, 2026
Merged

fix(Model): trigger the changeId event only if prevId is different from this.id#3147
kumilingus merged 2 commits intoclientIO:masterfrom
MartinKanera:fix/changeId-event-on-actual-change

Conversation

@MartinKanera
Copy link
Contributor

Description

This PR fixes a bug where the changeId event was being triggered even when the ID attribute wasn't actually changed. The fix adds a check to only trigger the event when the previous ID differs from the new ID.

Motivation and Context

Previously, setting a model's ID to the same value would still trigger the changeId event, which is incorrect behavior. This could cause unnecessary event handlers to fire and lead to unexpected side effects in applications relying on this event.

@kumilingus kumilingus merged commit 716f928 into clientIO:master Jan 26, 2026
3 checks passed
kumilingus pushed a commit to kumilingus/joint that referenced this pull request Feb 13, 2026
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