1
0
Evan You 9 жил өмнө
parent
commit
d74fd83279

+ 2 - 2
examples/todomvc/vuex/middlewares.js

@@ -1,7 +1,7 @@
 import { STORAGE_KEY } from './index'
 
 export default [{
-  after: function (action, state) {
-    localStorage.setItem(STORAGE_KEY, JSON.stringify(state.todos))
+  after: function (mutation, { todos }) {
+    localStorage.setItem(STORAGE_KEY, JSON.stringify(todos))
   }
 }]