Skip to content

Commit

Permalink
worker doc error
Browse files Browse the repository at this point in the history
  • Loading branch information
bugzpodder committed Sep 19, 2023
1 parent 7b86c11 commit 7afa814
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/src/components/PySandboxExample.astro
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ const { code, target, worker, restricted } = Astro.props;
let sandbox;
try {
if (this.dataset.worker) {
if (typeof SharedArrayBuffer === "undefined") {
throw new Error("Unable to use SharedArrayBuffer due insecure environment.");
}
sandbox = await getWorkerSandbox({
restricted: this.dataset.restricted,
});
Expand Down

0 comments on commit 7afa814

Please sign in to comment.