From 924f8d1cdf12f0eae21a282d10010ba5ac10431e Mon Sep 17 00:00:00 2001 From: Manik Tyagi Date: Thu, 4 Dec 2025 00:41:59 +0530 Subject: [PATCH] fix: use strict equality for boolean comparison in store.ts Replace loose equality (==) with strict equality (===) for isListening boolean comparison on line 253. This follows JavaScript best practices and prevents potential type coercion issues. The change is in the onTrigger callback within createSetupStore function, which handles debugger events during development mode. --- packages/pinia/src/store.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pinia/src/store.ts b/packages/pinia/src/store.ts index 7ec0e17aeb..02d1ab5156 100644 --- a/packages/pinia/src/store.ts +++ b/packages/pinia/src/store.ts @@ -250,7 +250,7 @@ function createSetupStore< if (isListening) { debuggerEvents = event // avoid triggering this while the store is being built and the state is being set in pinia - } else if (isListening == false && !store._hotUpdating) { + } else if (isListening === false && !store._hotUpdating) { // let patch send all the events together later /* istanbul ignore else */ if (Array.isArray(debuggerEvents)) {