Skip to content

Commit

Permalink
Fix error messages when logging out.
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoyo San committed Apr 2, 2020
1 parent 89717d2 commit 413950a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
2 changes: 1 addition & 1 deletion src/store/auth/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ function handleAuthStateChange ({ commit, dispatch }) {
{ root: true } // allows to trigger an action which is in a different module
)
} else {
commit('tasks/clearTasks', null, { root: true })
commit('setLoggedIn', false)
commit('tasks/clearTasks', null, { root: true })
LocalStorage.set('loggedIn', false)
this.$router.replace('/auth')
}
Expand Down
12 changes: 0 additions & 12 deletions src/store/tasks/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ function fbReadData ({ commit }) {
}

commit('addTask', payload)
}, error => {
if (error) {
showErrorMessage(error.message)
}
})

// listen on tasks being changed
Expand All @@ -84,20 +80,12 @@ function fbReadData ({ commit }) {
}

commit('updateTask', payload)
}, error => {
if (error) {
showErrorMessage(error.message)
}
})

// listen on tasks being deleted
userTasks.on('child_removed', snapshot => {
const id = snapshot.key
commit('deleteTask', id)
}, error => {
if (error) {
showErrorMessage(error.message)
}
})
}

Expand Down

0 comments on commit 413950a

Please sign in to comment.