File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -202,10 +202,13 @@ export default {
202
202
if (this .isOnlyMutationPayload && this .$shared .vuexAutoload ) {
203
203
this .loadState ()
204
204
}
205
+
206
+ bridge .on (' vuex:init' , this .onVuexInit )
205
207
},
206
208
207
209
destroyed () {
208
210
bridge .off (' vuex:mutation' , this .onMutation )
211
+ bridge .off (' vuex:init' , this .onVuexInit )
209
212
},
210
213
211
214
methods: {
@@ -258,7 +261,13 @@ export default {
258
261
if (this .$shared .vuexAutoload ) {
259
262
this .loadState ()
260
263
}
261
- }, 800 )
264
+ }, 800 ),
265
+
266
+ onVuexInit () {
267
+ if (this .$shared .vuexAutoload ) {
268
+ this .loadState ()
269
+ }
270
+ }
262
271
}
263
272
}
264
273
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ const state = {
26
26
const mutations = {
27
27
'INIT' ( state ) {
28
28
state . hasVuex = true
29
+ snapshotsCache . reset ( )
29
30
reset ( state )
30
31
} ,
31
32
You can’t perform that action at this time.
0 commit comments