Block page audit fallback

This commit is contained in:
softsimon committed 2022-12-01 19:17:59 +09:00
1 parent b0d05ba787
commit 77aaf4dd58
5 files changed
+20 -9

No files matched your search

+2 -2
View File
@@ -85,10 +85,10 @@ export const download = (href, name) => {
document.body.removeChild(a);
};
export function detectWebGL() {
export function detectWebGL(): boolean {
const canvas = document.createElement('canvas');
const gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
return (gl && gl instanceof WebGLRenderingContext);
return !!(gl && gl instanceof WebGLRenderingContext);
}
/**