From f12f8055290b105c5852081876a1bb6976d3ac60 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dami=C3=A1n=20Silvani?= <munshkr@gmail.com>
Date: Sat, 13 Jan 2024 14:56:01 -0300
Subject: [PATCH] fix(web): Use indirect eval so that this is `window` (fixes
 #235)

---
 packages/web/src/lib/hydra-wrapper.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/packages/web/src/lib/hydra-wrapper.ts b/packages/web/src/lib/hydra-wrapper.ts
index 34eb9319..597fc941 100644
--- a/packages/web/src/lib/hydra-wrapper.ts
+++ b/packages/web/src/lib/hydra-wrapper.ts
@@ -72,7 +72,7 @@ export class HydraWrapper {
     if (!this.initialized) await this.initialize();
 
     try {
-      await eval(`(async () => {\n${code}\n})()`);
+      await eval?.(`(async () => {\n${code}\n})()`);
       this._onError("");
     } catch (error) {
       console.error(error);