mirror of
https://github.com/MisskeyIO/misskey
synced 2024-11-27 14:28:49 +09:00
Fix offscreencanvas undefined (#11017)
* Suppress ReferenceError on some environments (i.e. older iOS) * fix * fix * lint * adopt suggestion by acid-chicken
This commit is contained in:
parent
d23ad8b511
commit
58a898dfe0
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user