From fba972c98e4408824182981c7d5ec1243635f3fa Mon Sep 17 00:00:00 2001 From: Dick Choi Date: Fri, 2 Sep 2016 09:41:01 +0900 Subject: [PATCH] remove deuplicate code --- browser/main/store.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/browser/main/store.js b/browser/main/store.js index b539d56c..46da68f2 100644 --- a/browser/main/store.js +++ b/browser/main/store.js @@ -329,7 +329,7 @@ function data (state = defaultDataMap(), action) { state.storageNoteMap = new Map(state.storageNoteMap) let storageNoteSet = state.storageNoteMap.get(action.storage.key) storageNoteSet = new Set(storageNoteSet) - storageNoteSet.delete() + state.storageNoteMap.set(action.storage.key, storageNoteSet) noteSet.forEach(function handleNoteKey (noteKey) { // Get note from noteMap let note = state.noteMap.get(noteKey) @@ -337,9 +337,6 @@ function data (state = defaultDataMap(), action) { state.noteMap.delete(noteKey) // From storageSet - let storageNoteSet = state.storageNoteMap.get(note.storage) - storageNoteSet = new Set(storageNoteSet) - state.storageNoteMap.set(note.storage, storageNoteSet) storageNoteSet.delete(noteKey) // From starredSet