From 4fc34f2bb5d033f88e94168c8122fe9da2ddcbdf Mon Sep 17 00:00:00 2001 From: Gon Pombo Date: Wed, 24 Jul 2024 14:57:01 -0300 Subject: [PATCH] ignore e@ preview messages (#6238) --- browser-interface/packages/entryPoints/startPreview.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/browser-interface/packages/entryPoints/startPreview.ts b/browser-interface/packages/entryPoints/startPreview.ts index 7a919b828c..780e2731f2 100644 --- a/browser-interface/packages/entryPoints/startPreview.ts +++ b/browser-interface/packages/entryPoints/startPreview.ts @@ -35,8 +35,7 @@ export async function startPreview(unityInterface: IUnityInterface) { const ws = new WebSocket(`${location.protocol === 'https:' ? 'wss' : 'ws'}://${document.location.host}`) ws.addEventListener('message', (msg) => { - if (msg.data.startsWith('{')) { - logger.log('Update message from CLI', msg.data) + if (typeof msg.data === 'string' && msg.data.startsWith('{')) { const message: sdk.Messages = JSON.parse(msg.data) handleServerMessage(message) }