From 5b6d15acb3ffa8a20142a4ecc422b5ccfab9f4cb Mon Sep 17 00:00:00 2001 From: azivner Date: Sun, 16 Dec 2018 10:41:47 +0100 Subject: [PATCH] note path might not always include root explicitly --- package.json | 4 ++-- src/public/javascripts/services/tree.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 87e80499d..e66805a01 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "ini": "1.3.5", "jimp": "0.6.0", "mime-types": "^2.1.21", - "moment": "2.22.2", + "moment": "2.23.0", "multer": "1.4.1", "open": "0.0.5", "rand-token": "0.4.0", @@ -69,7 +69,7 @@ "devtron": "1.4.0", "electron": "4.0.0-beta.9", "electron-compile": "6.4.3", - "electron-packager": "12.2.0", + "electron-packager": "13.0.1", "electron-rebuild": "1.8.2", "lorem-ipsum": "1.0.6", "tape": "4.9.1", diff --git a/src/public/javascripts/services/tree.js b/src/public/javascripts/services/tree.js index 4ad1fcc8b..205ecaad5 100644 --- a/src/public/javascripts/services/tree.js +++ b/src/public/javascripts/services/tree.js @@ -116,7 +116,7 @@ async function activateNote(notePath, newNote) { const hoistedNoteId = await hoistedNoteService.getHoistedNoteId(); - if (!notePath.includes(hoistedNoteId)) { + if (hoistedNoteId !== 'root' && !notePath.includes(hoistedNoteId)) { if (!await confirmDialog.confirm("Requested note is outside of hoisted note subtree. Do you want to unhoist?")) { return; }