Skip to content

Commit b30042a

Browse files
committed
Fix the value calculation
1 parent cbc34ab commit b30042a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

injected/src/utils.js

Lines changed: 3 additions & 2 deletions
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

@@ -305,7 +306,7 @@ const functionMap = {
305306
debugger;
306307
},
307308

308-
noop: () => {},
309+
noop: () => { },
309310
};
310311

311312
/**

0 commit comments

Comments
 (0)