From f1967fd466a316472a2c344146c2fc34bbf0db85 Mon Sep 17 00:00:00 2001 From: zadam Date: Thu, 13 Jun 2019 22:45:55 +0200 Subject: [PATCH] fix unhoisting note --- package-lock.json | 18 +++++++++--------- package.json | 4 ++-- src/public/javascripts/services/tree_utils.js | 4 +++- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 23ceaeb15..01b8cd900 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5013,9 +5013,9 @@ } }, "file-type": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-11.1.0.tgz", - "integrity": "sha512-rM0UO7Qm9K7TWTtA6AShI/t7H5BPjDeGVDaNyg9BjHAj3PysKy7+8C8D137R88jnR3rFJZQB/tFgydl5sN5m7g==" + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-12.0.0.tgz", + "integrity": "sha512-VV3aQAyoV/fHl0I9uU3/DGjItgh5nylAoJPHOXkZXHW4nFFrxJnHR2xdVqsqyw/9fqYy80m+tS+Rf77w0FTKqg==" }, "filename-regex": { "version": "2.0.1", @@ -8554,9 +8554,9 @@ } }, "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" } } }, @@ -11469,9 +11469,9 @@ } }, "sqlite3": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-4.0.8.tgz", - "integrity": "sha512-kgwHu4j10KhpCHtx//dejd/tVQot7jc3sw+Sn0vMuKOw0X00Ckyg9VceKgzPyGmmz+zEoYue9tOLriWTvYy0ww==", + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-4.0.9.tgz", + "integrity": "sha512-IkvzjmsWQl9BuBiM4xKpl5X8WCR4w0AeJHRdobCdXZ8dT/lNc1XS6WqvY35N6+YzIIgzSBeY5prdFObID9F9tA==", "requires": { "nan": "^2.12.1", "node-pre-gyp": "^0.11.0", diff --git a/package.json b/package.json index d5c8e1448..b3402d393 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "electron-window-state": "5.0.3", "express": "4.17.1", "express-session": "1.16.2", - "file-type": "11.1.0", + "file-type": "12.0.0", "fs-extra": "8.0.1", "get-port": "5.0.0", "helmet": "3.18.0", @@ -66,7 +66,7 @@ "session-file-store": "1.3.0", "simple-node-logger": "18.12.22", "sqlite": "3.0.3", - "sqlite3": "4.0.8", + "sqlite3": "4.0.9", "tar-stream": "2.1.0", "turndown": "5.0.3", "unescape": "1.0.1", diff --git a/src/public/javascripts/services/tree_utils.js b/src/public/javascripts/services/tree_utils.js index bcd903ec6..3487d6114 100644 --- a/src/public/javascripts/services/tree_utils.js +++ b/src/public/javascripts/services/tree_utils.js @@ -38,7 +38,9 @@ async function getNotePath(node) { node = node.getParent(); } - path.push(node.data.noteId); // root or hoisted noteId + if (node) { // null node can happen directly after unhoisting when tree is still hoisted but option has been changed already + path.push(node.data.noteId); // root or hoisted noteId + } return path.reverse().join("/"); }