Merge pull request #5187 from GHolk/tab-history-undefined-error
Some checks are pending
e2e / test (firefox, ubuntu) (push) Waiting to run
e2e / test (firefox, windows) (push) Waiting to run
e2e / test (firefoxesr, ubuntu) (push) Waiting to run
lint / lint (lint) (push) Waiting to run
lint / lint (mozilla) (push) Waiting to run
lint / lint (unit) (push) Waiting to run
Website / build (push) Waiting to run
Website / deploy (push) Blocked by required conditions

Fix TabHistory completion error message
This commit is contained in:
Oliver Blanthorn 2025-03-08 10:26:06 +00:00 committed by GitHub
commit 2e8f21380c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -127,7 +127,9 @@ export class TabHistoryCompletionSource extends Completions.CompletionSourceFuse
let history = await browserBg.sessions.getTabValue(tab[0].id, "history")
if (!history) history = { list: [] }
const tree = this.makeTree(history["list"])
history["list"] = this.flattenTree(tree[0]).reverse()
if (tree.length > 0) {
history["list"] = this.flattenTree(tree[0]).reverse()
}
this.addIndicies(history["list"])
this.addFormatTimeSpan(history["list"])