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 dee0492 commit 4dd5a27
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Store.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@ class Store {

subscribe = (cb) => {
cb = memoizeByArgs(cb)
let _order = 0;
const _cb = (order) => {
if (order > _order) {
if (order >= this.#order) {
cb(this.state, this.prevState)
_order = order
}
}

Expand Down

0 comments on commit 4dd5a27

Please sign in to comment.