diff --git a/examples/zkapps/04-zkapp-browser-ui/ui/src/pages/zkappWorker.ts b/examples/zkapps/04-zkapp-browser-ui/ui/src/pages/zkappWorker.ts index 793ff194b..795c1d352 100644 --- a/examples/zkapps/04-zkapp-browser-ui/ui/src/pages/zkappWorker.ts +++ b/examples/zkapps/04-zkapp-browser-ui/ui/src/pages/zkappWorker.ts @@ -71,7 +71,7 @@ export type ZkappWorkerReponse = { id: number; data: any; }; -if (process.browser) { +if (typeof window !== 'undefined') { addEventListener( 'message', async (event: MessageEvent) => {