Skip to content

Commit 58c4b3d

Browse files
committed
move more initialization into the try/catch
1 parent 9ef05fa commit 58c4b3d

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

frontend/wave.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -160,17 +160,17 @@ async function initWave(initOpts: WaveInitOpts) {
160160
const globalWS = initWshrpc(makeTabRouteId(initOpts.tabId));
161161
(window as any).globalWS = globalWS;
162162
(window as any).TabRpcClient = TabRpcClient;
163-
await loadConnStatus();
164-
await loadBadges();
165-
initGlobalWaveEventSubs(initOpts);
166-
subscribeToConnEvents();
167-
if (isMacOS()) {
168-
const macOSVersion = await RpcApi.MacOSVersionCommand(TabRpcClient);
169-
setMacOSVersion(macOSVersion);
170-
}
171163

172164
// ensures client/window/workspace are loaded into the cache before rendering
173165
try {
166+
await loadConnStatus();
167+
await loadBadges();
168+
initGlobalWaveEventSubs(initOpts);
169+
subscribeToConnEvents();
170+
if (isMacOS()) {
171+
const macOSVersion = await RpcApi.MacOSVersionCommand(TabRpcClient);
172+
setMacOSVersion(macOSVersion);
173+
}
174174
const [_client, waveWindow, initialTab] = await Promise.all([
175175
WOS.loadAndPinWaveObject<Client>(WOS.makeORef("client", initOpts.clientId)),
176176
WOS.loadAndPinWaveObject<WaveWindow>(WOS.makeORef("window", initOpts.windowId)),

0 commit comments

Comments
 (0)