Fix nullchecks in wave.ts (#1491)

This commit is contained in:
Evan Simkowitz 2024-12-11 10:46:08 -08:00 committed by GitHub
parent 7ecdf249bd
commit 448262c17f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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<Tab>(WOS.makeORef("tab", tabid));
});
ws?.pinnedtabids?.forEach((tabid) => {
ws.pinnedtabids?.forEach((tabid) => {
WOS.reloadWaveObject<Tab>(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<Tab>(WOS.makeORef("tab", tabid));
});
ws.pinnedtabids.forEach((tabid) => {
ws.pinnedtabids?.forEach((tabid) => {
WOS.getObjectValue<Tab>(WOS.makeORef("tab", tabid));
});
}