Skip to content

Commit

Permalink
Merge pull request #236 from munshkr/235-window-eval
Browse files Browse the repository at this point in the history
fix(web): Use indirect eval so that this is `window` (fixes #235)
  • Loading branch information
munshkr authored Jan 13, 2024
2 parents aaffa25 + f12f805 commit adaf6f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/web/src/lib/hydra-wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit adaf6f7

Please sign in to comment.