Skip to content

Commit 924f8d1

Browse files
committed
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.
1 parent 94cc16c commit 924f8d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/pinia/src/store.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ function createSetupStore<
250250
if (isListening) {
251251
debuggerEvents = event
252252
// avoid triggering this while the store is being built and the state is being set in pinia
253-
} else if (isListening == false && !store._hotUpdating) {
253+
} else if (isListening === false && !store._hotUpdating) {
254254
// let patch send all the events together later
255255
/* istanbul ignore else */
256256
if (Array.isArray(debuggerEvents)) {

0 commit comments

Comments
 (0)