From 448262c17f7141c34c8ad2626eef719d02b1d20b Mon Sep 17 00:00:00 2001 From: Evan Simkowitz Date: Wed, 11 Dec 2024 10:46:08 -0800 Subject: [PATCH] Fix nullchecks in wave.ts (#1491) --- frontend/wave.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/wave.ts b/frontend/wave.ts index 4328c4fe2..e69a1663f 100644 --- a/frontend/wave.ts +++ b/frontend/wave.ts @@ -112,10 +112,10 @@ function reloadAllWorkspaceTabs(ws: Workspace) { if (ws == null || (!ws.tabids?.length && !ws.pinnedtabids?.length)) { return; } - ws?.tabids.forEach((tabid) => { + ws.tabids?.forEach((tabid) => { WOS.reloadWaveObject(WOS.makeORef("tab", tabid)); }); - ws?.pinnedtabids?.forEach((tabid) => { + ws.pinnedtabids?.forEach((tabid) => { WOS.reloadWaveObject(WOS.makeORef("tab", tabid)); }); } @@ -124,10 +124,10 @@ function loadAllWorkspaceTabs(ws: Workspace) { if (ws == null || (!ws.tabids?.length && !ws.pinnedtabids?.length)) { return; } - ws.tabids.forEach((tabid) => { + ws.tabids?.forEach((tabid) => { WOS.getObjectValue(WOS.makeORef("tab", tabid)); }); - ws.pinnedtabids.forEach((tabid) => { + ws.pinnedtabids?.forEach((tabid) => { WOS.getObjectValue(WOS.makeORef("tab", tabid)); }); }