From d751b2d40f7850da5fe1dd8ca856637cadb90be8 Mon Sep 17 00:00:00 2001 From: Corbin Crutchley Date: Fri, 29 Nov 2024 07:07:36 -0800 Subject: [PATCH] fix: prevState now works as intended --- packages/store/src/store.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/store/src/store.ts b/packages/store/src/store.ts index 8a372fa..4263755 100644 --- a/packages/store/src/store.ts +++ b/packages/store/src/store.ts @@ -66,7 +66,6 @@ export class Store< // Attempt to flush this._flush() - this.prevState = this.state } /** @@ -78,6 +77,7 @@ export class Store< for (const listener of this.listeners) { if (this._flushing !== flushId) continue listener({ prevVal: this.prevState, currentVal: this.state }) + this.prevState = this.state } }