Skip to content

Commit

Permalink
chore(web): electron.dock might be undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
gribnoysup committed Sep 30, 2024
1 parent 4ffeb43 commit 22bc9ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions packages/compass-e2e-tests/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ async function setup() {
}
);

compassWeb.stdout.pipe(process.stdout);
compassWeb.stderr.pipe(process.stderr);

let serverReady = false;
const start = Date.now();
while (!serverReady) {
Expand Down
6 changes: 3 additions & 3 deletions packages/compass-web/scripts/electron-proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ class AtlasCloudAuthenticator {
throw new Error('Window closed before finished signing in');
}),
]);
electronApp.dock.show();
electronApp.dock?.show();
void bw.loadURL(`${CLOUD_ORIGIN}/account/login`);
return authInfoPromise;
} finally {
Expand Down Expand Up @@ -473,7 +473,7 @@ expressProxy.use(
proxyMiddleware(`http://localhost:${WEBPACK_DEV_SERVER_PORT}`)
);

electronApp.dock.hide();
electronApp.dock?.hide();

// eslint-disable-next-line no-console
console.log('[electron-proxy] starting proxy server on port %s', PROXY_PORT);
Expand Down Expand Up @@ -544,7 +544,7 @@ electronApp.whenReady().then(async () => {
// We want proxy to keep running even when all the windows are closed, but
// hide the dock icon because there are not windows associated with it
// anyway
electronApp.dock.hide();
electronApp.dock?.hide();
});

electronApp.on('will-quit', (evt) => {
Expand Down

0 comments on commit 22bc9ec

Please sign in to comment.