From d833f572146fcee0b535950f62139bcb48673435 Mon Sep 17 00:00:00 2001 From: bqxbqx <132878537+BQXBQX@users.noreply.github.com> Date: Fri, 27 Dec 2024 00:17:13 +0800 Subject: [PATCH] fix: pass missing config to setTimeout in getSpareTab (#1627) - Fixed an issue where `fullConfig` was not passed to `setTimeout` in `getSpareTab`. - Wrapped `ensureHotSpareTab` with an arrow function to ensure `fullConfig` is properly passed. **When I use wave as my terminal, sometimes the setting does not work. I read the source code and found this issue** Co-authored-by: Evan Simkowitz --- emain/emain-tabview.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emain/emain-tabview.ts b/emain/emain-tabview.ts index 9f13278f4..2b53e0a0a 100644 --- a/emain/emain-tabview.ts +++ b/emain/emain-tabview.ts @@ -263,7 +263,7 @@ export function ensureHotSpareTab(fullConfig: FullConfigType) { } export function getSpareTab(fullConfig: FullConfigType): WaveTabView { - setTimeout(ensureHotSpareTab, 500); + setTimeout(() => ensureHotSpareTab(fullConfig), 500); if (HotSpareTab != null) { const rtn = HotSpareTab; HotSpareTab = null;