diff --git a/src/reducers/range.js b/src/reducers/range.js index cfbe740b..b8a0800a 100644 --- a/src/reducers/range.js +++ b/src/reducers/range.js @@ -260,7 +260,6 @@ const range = (state = DEFAULT_RANGES_STATE, action) => { const removals = { $unset: [], }; - const deleted = []; Object.values(state) .sort( (a, b) => diff --git a/src/sagas/index.js b/src/sagas/index.js index 7e79bade..8c6a6041 100644 --- a/src/sagas/index.js +++ b/src/sagas/index.js @@ -174,8 +174,17 @@ function* afterDelete() { } function* multiDelete({ selecteds }) { - for (var i = 0; i < selecteds.length; i++) { - yield put(deleteRange(selecteds[i])); + let confirmed = true; + if (selecteds.length > 1) { + confirmed = yield call( + showConfirmation, + 'Multiple ranges will be deleted. Redundant length groups will be removed. Do you wish to continue?' + ); + } + if (confirmed) { + for (var i = 0; i < selecteds.length; i++) { + yield put(deleteRange(selecteds[i])); + } } }