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) }