mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 09:31:41 -05:00
Always return int from comparator
Even though it works fine, since comparator should always formally return int, comply with this requirement to reduce chances of bugs in case sort implementation changes
This commit is contained in:
parent
e4cef503fc
commit
d2f5c87693
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ import * as R from "ramda"
|
|||
export async function getSortedTabs(): Promise<browser.tabs.Tab[]> {
|
||||
const comp =
|
||||
config.get("tabsort") === "mru"
|
||||
? (a, b) => a.active || -b.active || b.lastAccessed - a.lastAccessed
|
||||
? (a, b) => +a.active || -b.active || b.lastAccessed - a.lastAccessed
|
||||
: (a, b) => a.index - b.index
|
||||
const hiddenVal = config.get("tabshowhidden") === "true" ? undefined : false
|
||||
return browserBg.tabs
|
||||
|
|
Loading…
Add table
Reference in a new issue