Fix a couple of little bugs

This commit is contained in:
Oliver Blanthorn 2022-05-15 15:31:24 +02:00
parent 597ad6320b
commit 300b8c0e7e
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3
2 changed files with 2 additions and 1 deletions

View file

@ -68,6 +68,7 @@ export class TabHistoryCompletionSource extends Completions.CompletionSourceFuse
parent: node["parent"],
id: node["id"],
level: node["level"] === 0 ? node["level"] : node["level"] - 1,
time: node["time"],
})
for (const child of node["children"]) {
this.flattenTree(child, flat)

View file

@ -1117,7 +1117,7 @@ export async function addTabHistory() {
const current = pages["list"].findIndex(item => item.href === link)
if (current !== -1) {
pages["current"] = current
page["list"][current].time = Date.now()
pages["list"][current].time = Date.now()
} else {
pages["list"].push({
parent: pages["current"],