summaryrefslogtreecommitdiff
path: root/packages/frontend/src/workers/test-webgl2.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-09-19 17:08:55 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2023-09-19 17:08:55 +0900
commit934e4be658d253317d6d157d107a6a953f660920 (patch)
treefa5aa528b546c81dc6877d52d14327a0a4441dfc /packages/frontend/src/workers/test-webgl2.ts
parentMerge branch 'develop' of https://github.com/misskey-dev/misskey into develop (diff)
downloadmisskey-934e4be658d253317d6d157d107a6a953f660920.tar.gz
misskey-934e4be658d253317d6d157d107a6a953f660920.tar.bz2
misskey-934e4be658d253317d6d157d107a6a953f660920.zip
fix(frontend): 環境によってはMisskey Webが開けない問題を修正
Fix #11846
Diffstat (limited to '')
-rw-r--r--packages/frontend/src/workers/test-webgl2.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/frontend/src/workers/test-webgl2.ts b/packages/frontend/src/workers/test-webgl2.ts
index b3501cfe50..8f57e5039b 100644
--- a/packages/frontend/src/workers/test-webgl2.ts
+++ b/packages/frontend/src/workers/test-webgl2.ts
@@ -4,7 +4,9 @@
*/
const canvas = globalThis.OffscreenCanvas && new OffscreenCanvas(1, 1);
-const gl = canvas.getContext('webgl2');
+// 環境によってはOffscreenCanvasが存在しないため
+// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
+const gl = canvas?.getContext('webgl2');
if (gl) {
postMessage({ result: true });
} else {