From f9fcdb2bfeeb810ef7f4b834ef3e5db52e39fd45 Mon Sep 17 00:00:00 2001 From: ymekuria Date: Thu, 13 Jul 2023 00:12:09 -0700 Subject: [PATCH] feat: replace deprecated process.browser in web worker --- examples/zkapps/04-zkapp-browser-ui/ui/src/pages/zkappWorker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) => {