mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 13:26:01 +01:00
fixes for invalid operations on root note
This commit is contained in:
@@ -4,7 +4,7 @@ import treeCache from "./tree_cache.js";
|
||||
const $tree = $("#tree");
|
||||
|
||||
function getParentProtectedStatus(node) {
|
||||
return utils.isTopLevelNode(node) ? 0 : node.getParent().data.isProtected;
|
||||
return utils.isRootNode(node) ? 0 : node.getParent().data.isProtected;
|
||||
}
|
||||
|
||||
function getNodeByKey(key) {
|
||||
@@ -32,6 +32,8 @@ function getNotePath(node) {
|
||||
node = node.getParent();
|
||||
}
|
||||
|
||||
path.push('root');
|
||||
|
||||
return path.reverse().join("/");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user