Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben-Arushanyan committed Oct 3, 2023
1 parent 9ff9061 commit 5871f4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Store.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ class Store {
if (!eq(newState, this.state)) {
this.prevState = this.state
this.state = newState
this.#emitter.unlock(this.#emitter_key).emit(this.state, this.prevState)
this.#emitter.unlock(this.#emitter_key).emit()
}
}

subscribe = (cb) => {
const _cb = (...args) => cb(...args)
const _cb = () => cb(this.state, this.prevState)
this.#emitter.on(_cb)
return () => this.#emitter.off(_cb)
}
Expand Down

0 comments on commit 5871f4a

Please sign in to comment.