Fix radix

This commit is contained in:
Oliver Blanthorn 2023-06-05 16:01:21 +02:00
parent a3be85fc72
commit f50181ba04
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3

View file

@ -2616,7 +2616,7 @@ export async function tabprev(...args: string[]) {
option["nowrap"] = Boolean(argOpt["--nowrap"]) option["nowrap"] = Boolean(argOpt["--nowrap"])
option["noisy"] = Boolean(argOpt["--noisy"]) option["noisy"] = Boolean(argOpt["--noisy"])
option["reverse"] = Boolean(argOpt["--reverse"]) option["reverse"] = Boolean(argOpt["--reverse"])
const increment = (parseInt(argOpt._.join(" ")) || 1) * (option["reverse"] ? -1 : 1) const increment = (parseInt(argOpt._.join(" "), 10) || 1) * (option["reverse"] ? -1 : 1)
return browser.tabs.query({ currentWindow: true, hidden: false }).then(tabs => { return browser.tabs.query({ currentWindow: true, hidden: false }).then(tabs => {
tabs.sort((t1, t2) => t1.index - t2.index) tabs.sort((t1, t2) => t1.index - t2.index)
const curTab = tabs.findIndex(t => t.active) const curTab = tabs.findIndex(t => t.active)