mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-25 01:36:43 -06: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 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
const canvas = new OffscreenCanvas(1, 1);
|
const canvas = globalThis.OffscreenCanvas && new OffscreenCanvas(1, 1);
|
||||||
const gl = canvas.getContext('webgl2');
|
const gl = canvas?.getContext('webgl2');
|
||||||
if (gl) {
|
if (gl) {
|
||||||
postMessage({ result: true });
|
postMessage({ result: true });
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue