diff --git a/src/store/modules/sample.js b/src/store/modules/sample.js index 04bdb20..c13d6dd 100644 --- a/src/store/modules/sample.js +++ b/src/store/modules/sample.js @@ -32,7 +32,9 @@ const sample = { REMOVE_SAMPLE_DATA: (state, inputFileName) => { const findIndex = state.sampleList.findIndex(item => item.inputFileName == inputFileName) - state.sampleList.splice(findIndex, 1) + if(-1 !== findIndex) { + state.sampleList.splice(findIndex, 1) + } }, CLEAR_SAMPLE_DATA: (state) => {