From 6251678532cc442703cc02ad2446abbde97450e0 Mon Sep 17 00:00:00 2001 From: TheMas3212 Date: Sun, 2 Jan 2022 02:16:32 +1100 Subject: [PATCH] clear currentScript to null not undefined --- src/ScriptEditor/ui/ScriptEditorRoot.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ScriptEditor/ui/ScriptEditorRoot.tsx b/src/ScriptEditor/ui/ScriptEditorRoot.tsx index 09b31d1d1..ebb766fa8 100644 --- a/src/ScriptEditor/ui/ScriptEditorRoot.tsx +++ b/src/ScriptEditor/ui/ScriptEditorRoot.tsx @@ -126,6 +126,7 @@ export function Root(props: IProps): React.ReactElement { }) if (currentScript && (GetServer(currentScript.hostname) === null)) { currentScript = openScripts[0]; + if (currentScript === undefined) currentScript = null; }