1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 01:36:22 +00:00

remove deuplicate code

This commit is contained in:
Dick Choi
2016-09-02 09:41:01 +09:00
parent a391ac682d
commit fba972c98e

View File

@@ -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