Skip to content

Commit

Permalink
Fix update local field but not trigger change event.
Browse files Browse the repository at this point in the history
  • Loading branch information
ulion committed Apr 9, 2021
1 parent f1523a6 commit c3e3a30
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions awareness.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,10 @@ export class Awareness extends Observable {
setLocalStateField (field, value) {
const state = this.getLocalState()
if (state !== null) {
state[field] = value
this.setLocalState(state)
this.setLocalState({
...state,
[field]: value
})
}
}

Expand Down

0 comments on commit c3e3a30

Please sign in to comment.