Fixed crumbs

This commit is contained in:
Magnus Åhall 2024-12-19 23:13:41 +01:00
parent 147dc12e99
commit e07258e014
3 changed files with 31 additions and 13 deletions

View file

@ -115,9 +115,9 @@ export class NodeStore {
}//}}}
node(uuid, dataIfUndefined, newLevel) {//{{{
let n = this.node[uuid]
let n = this.nodes[uuid]
if (n === undefined && dataIfUndefined !== undefined)
n = this.node[uuid] = new Node(dataIfUndefined, newLevel)
n = this.nodes[uuid] = new Node(dataIfUndefined, newLevel)
return n
}//}}}
@ -355,6 +355,9 @@ export class NodeStore {
}//}}}
async getNodeAncestry(node, accumulated) {//{{{
return new Promise((resolve, reject) => {
if (accumulated === undefined)
accumulated = []
const nodeParentIndex = this.db
.transaction('nodes', 'readonly')
.objectStore('nodes')