From 211424bd1be83bb258f8b70f3629bf4eb5d7b5a1 Mon Sep 17 00:00:00 2001 From: Alberto Monterroso <14013679+Albermonte@users.noreply.github.com> Date: Wed, 15 Jan 2025 15:49:56 +0100 Subject: [PATCH] web-client: Fix type error --- web-client/extras/launcher/client-proxy.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web-client/extras/launcher/client-proxy.ts b/web-client/extras/launcher/client-proxy.ts index f7607c7667..c4cd1b44bf 100644 --- a/web-client/extras/launcher/client-proxy.ts +++ b/web-client/extras/launcher/client-proxy.ts @@ -59,8 +59,7 @@ export function clientFactory(workerFactory: () => Worker, comlinkWrapper: (work await new Promise((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') {