mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 17:41:40 -05:00
Fix bufferall selecting the wrong window.
The problem was that when calling sort on an array of numbers without specifying the sort function that should be used, the array will be sorted according to the lexicographic order of the elements. This is fixed by specifying what function should be used to sort the array. This fixes https://github.com/cmcaine/tridactyl/issues/819.
This commit is contained in:
parent
5b30812361
commit
96d0b20cc5
1 changed files with 1 additions and 1 deletions
|
@ -2324,7 +2324,7 @@ export async function buffer(index: number | "#") {
|
|||
*/
|
||||
//#background
|
||||
export async function bufferall(id: string) {
|
||||
let windows = (await browser.windows.getAll()).map(w => w.id).sort()
|
||||
let windows = (await browser.windows.getAll()).map(w => w.id).sort((a, b) => a - b)
|
||||
if (id === null || id === undefined || !id.match(/\d+\.\d+/)) {
|
||||
const tab = await activeTab()
|
||||
let prevId = id
|
||||
|
|
Loading…
Add table
Reference in a new issue