From a0f8e905e2a93d4950f742598f411942530e1a6c Mon Sep 17 00:00:00 2001 From: Mark Haslinghuis Date: Fri, 1 Dec 2023 10:18:19 +0100 Subject: [PATCH] Fix tab switch (#3641) * Fix tab switch * Use includes instead of indexoff --- src/js/gui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/gui.js b/src/js/gui.js index 50630c754d..1f3a506243 100644 --- a/src/js/gui.js +++ b/src/js/gui.js @@ -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'); }