Skip to content

Commit

Permalink
Fix tab switch (#3641)
Browse files Browse the repository at this point in the history
* Fix tab switch

* Use includes instead of indexoff
  • Loading branch information
haslinghuis committed Dec 1, 2023
1 parent 3822cf2 commit 68e173b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/gui.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ class GuiControl {
}
selectDefaultTabWhenConnected() {
const result = getConfig(['rememberLastTab', 'lastTab']);
const tab = result.rememberLastTab && result.lastTab ? result.lastTab : 'tab_setup';
const tab = result.rememberLastTab && result.lastTab && this.allowedTabs.includes(result.lastTab.substring(4)) ? result.lastTab : 'tab_setup';

$(`#tabs ul.mode-connected .${tab} a`).trigger('click');
}
Expand Down

0 comments on commit 68e173b

Please sign in to comment.