Skip to content

Commit

Permalink
web-client: Fix type error
Browse files Browse the repository at this point in the history
  • Loading branch information
Albermonte authored and jsdanielh committed Jan 17, 2025
1 parent 959d11d commit 211424b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions web-client/extras/launcher/client-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ export function clientFactory(workerFactory: () => Worker, comlinkWrapper: (work
await new Promise<void>((resolve, reject) => {
addEventListener(worker, 'message', (event) => {
const eventData = getEventData(event);

if (!('ok' in eventData)) return;
if (typeof eventData !== 'object' || !('ok' in eventData)) return;

if (eventData.ok === true) resolve();
if (eventData.ok === false && 'error' in eventData && typeof eventData.error === 'string') {
Expand Down

0 comments on commit 211424b

Please sign in to comment.