Skip to content

Commit a004085

Browse files
author
王泳超
committed
fix: handle error when store has no method in resetAllStores
1 parent 7f269e0 commit a004085

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/stores/src/setup.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ export function resetAllStores() {
3838
}
3939
const allStores = (pinia as any)._s;
4040
for (const [_key, store] of allStores) {
41-
store.$reset();
41+
store?.$reset();
4242
}
4343
}

0 commit comments

Comments
 (0)