]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
chore: hot with dev
authorEduardo San Martin Morote <posva13@gmail.com>
Tue, 20 Jul 2021 07:40:24 +0000 (09:40 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Tue, 20 Jul 2021 07:40:24 +0000 (09:40 +0200)
src/store.ts

index 51f3999b031b692ae887a31e0d2b8605e45f33f3..fe13c80858e7ef2f2a4bb1cead9a03a961b89426 100644 (file)
@@ -189,7 +189,7 @@ function createSetupStore<
   let debuggerEvents: DebuggerEvent[] | DebuggerEvent
   const initialState = pinia.state.value[$id] as UnwrapRef<S> | undefined
 
-  if (!initialState && !hot) {
+  if (!initialState && __DEV__ && !hot) {
     // should be set in Vue 2
     pinia.state.value[$id] = {}
   }