From bba9e5fb20cb9dc49fc69994336e88912677a258 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Fri, 12 Apr 2019 13:10:23 +0200 Subject: [PATCH] [FIX] examples: update store example --- examples/todoapp/store.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/todoapp/store.js b/examples/todoapp/store.js index 44d061a1..2ceea718 100644 --- a/examples/todoapp/store.js +++ b/examples/todoapp/store.js @@ -35,16 +35,16 @@ const actions = { //------------------------------------------------------------------------------ const mutations = { - addTodo(state, title) { + addTodo({ state }, title) { const id = state.nextId++; const todo = { id, title, completed: false }; state.todos.push(todo); }, - removeTodo(state, id) { + removeTodo({ state }, id) { const index = state.todos.findIndex(t => t.id === id); state.todos.splice(index, 1); }, - editTodo(state, { id, title, completed }) { + editTodo({ state }, { id, title, completed }) { const todo = state.todos.find(t => t.id === id); if (title !== undefined) { todo.title = title;