diff --git a/app/common/state/bookmarksState.js b/app/common/state/bookmarksState.js index 6d0b38c2a27..9013e776957 100644 --- a/app/common/state/bookmarksState.js +++ b/app/common/state/bookmarksState.js @@ -270,10 +270,15 @@ const bookmarksState = { : destinationItem.get('folderId') state = bookmarkOrderCache.removeCacheKey(state, bookmark.get('parentFolderId'), bookmarkKey) + state = bookmarkLocationCache.removeCacheKey(state, bookmark.get('location'), bookmarkKey) + bookmark = bookmark.set('parentFolderId', ~~parentFolderId) const newKey = bookmarkUtil.getKey(bookmark) + state = state.deleteIn([STATE_SITES.BOOKMARKS, bookmarkKey]) state = bookmarkOrderCache.addBookmarkToCache(state, bookmark.get('parentFolderId'), newKey) + state = bookmarkLocationCache.addCacheKey(state, bookmark.get('location'), newKey) + bookmark = bookmark.set('key', newKey) return state.setIn([STATE_SITES.BOOKMARKS, newKey], bookmark) }