diff --git a/packages/frontend/src/workers/test-webgl2.ts b/packages/frontend/src/workers/test-webgl2.ts index 4769524d9c..8f13c57cae 100644 --- a/packages/frontend/src/workers/test-webgl2.ts +++ b/packages/frontend/src/workers/test-webgl2.ts @@ -1,5 +1,5 @@ -const canvas = new OffscreenCanvas(1, 1); -const gl = canvas.getContext('webgl2'); +const canvas = globalThis.OffscreenCanvas && new OffscreenCanvas(1, 1); +const gl = canvas?.getContext('webgl2'); if (gl) { postMessage({ result: true }); } else {