note path might not always include root explicitly

This commit is contained in:
azivner 2018-12-16 10:41:47 +01:00
parent 841420360e
commit 5b6d15acb3
2 changed files with 3 additions and 3 deletions

View File

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

View File

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