diff --git a/src/store/modules/errorLog.js b/src/store/modules/errorLog.js index 8e3db060..6b01f957 100644 --- a/src/store/modules/errorLog.js +++ b/src/store/modules/errorLog.js @@ -5,12 +5,18 @@ const state = { const mutations = { ADD_ERROR_LOG: (state, log) => { state.logs.push(log) + }, + CLEAR_ERROR_LOG: (state) => { + state.logs.splice(0) } } const actions = { addErrorLog({ commit }, log) { commit('ADD_ERROR_LOG', log) + }, + clearErrorLog({ commit }) { + commit('CLEAR_ERROR_LOG') } }