diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-09-19 17:08:55 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2023-09-19 17:08:55 +0900 |
| commit | 934e4be658d253317d6d157d107a6a953f660920 (patch) | |
| tree | fa5aa528b546c81dc6877d52d14327a0a4441dfc /packages/frontend/src/workers/test-webgl2.ts | |
| parent | Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop (diff) | |
| download | misskey-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.ts | 4 |
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 { |