Skip to content

Commit 78ec9a1

Browse files
authored
feat: avoid missing injection not found in edge Vue 2 edge case (#1849)
Related to #1650
1 parent 5839958 commit 78ec9a1

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
@@ -886,7 +886,7 @@ export function defineStore(
886886
// in test mode, ignore the argument provided as we can always retrieve a
887887
// pinia instance with getActivePinia()
888888
(__TEST__ && activePinia && activePinia._testing ? null : pinia) ||
889-
(currentInstance && inject(piniaSymbol))
889+
(currentInstance && inject(piniaSymbol, null))
890890
if (pinia) setActivePinia(pinia)
891891

892892
if (__DEV__ && !activePinia) {

0 commit comments

Comments
 (0)