summaryrefslogtreecommitdiff
path: root/packages/frontend/src/workers/test-webgl2.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/frontend/src/workers/test-webgl2.ts')
-rw-r--r--packages/frontend/src/workers/test-webgl2.ts4
1 files changed, 2 insertions, 2 deletions
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 {