diff options
author | Marcel Klehr <mklehr@gmx.net> | 2022-07-24 14:13:01 +0300 |
---|---|---|
committer | Marcel Klehr <mklehr@gmx.net> | 2022-07-27 18:29:01 +0300 |
commit | 53d4b5c9d3fbb1ce0986b387231acf5f9c795042 (patch) | |
tree | e42dbde35bbd6f0906763aa321bfc93598f6bb54 | |
parent | 341261819badf4642889457a7954edeebeb7a49f (diff) |
Fix COPY_SELECTION
- Do not allow copying folders
- Do not remove bookmarks from original folder
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
-rw-r--r-- | src/store/actions.js | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/store/actions.js b/src/store/actions.js index df805902..9c2275f9 100644 --- a/src/store/actions.js +++ b/src/store/actions.js @@ -831,16 +831,9 @@ export default { await Parallel.each( state.selection.folders, async folder => { - if (folderId === folder.id) { - throw new Error('Cannot copy folder into itself') + if (folder) { + throw new Error('Cannot copy folders') } - const oldParent = folder.parent_folder - folder.parent_folder = folderId - await dispatch(actions.SAVE_FOLDER, folder.id) // _s children order for new parent - await dispatch( - actions.LOAD_FOLDER_CHILDREN_ORDER, - oldParent - ) }, 10 ) @@ -849,7 +842,6 @@ export default { Parallel.each( state.selection.bookmarks, bookmark => { - commit(mutations.REMOVE_BOOKMARK, bookmark.id) return dispatch(actions.COPY_BOOKMARK, { newFolder: folderId, bookmark: bookmark.id, |