Skip to content

Commit 258c956

Browse files
committed
Fix the value calculation
1 parent cbc34ab commit 258c956

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

injected/src/utils.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,8 @@ function isAppleSilicon() {
269269

270270
// Best guess if the device is an Apple Silicon
271271
// https://stackoverflow.com/a/65412357
272-
isAppleSiliconCache = gl?.getSupportedExtensions()?.indexOf('WEBGL_compressed_texture_etc') !== -1;
272+
const compressedTextureValue = gl?.getSupportedExtensions()?.indexOf('WEBGL_compressed_texture_etc');
273+
isAppleSiliconCache = typeof compressedTextureValue === 'number' && compressedTextureValue !== -1;
273274
return isAppleSiliconCache;
274275
}
275276

0 commit comments

Comments
 (0)