We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
isAppleSilicon()
1 parent 2b125c8 commit b1c7dfcCopy full SHA for b1c7dfc
src/helpers/ua-parser-helpers.js
@@ -15,12 +15,12 @@ const { isStandalonePWA } = require('is-standalone-pwa');
15
16
const getDeviceVendor = (model) => UAParser(`Mozilla/5.0 (Linux; Android 10; ${model}) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.0.0 Safari/537.36`).device.vendor;
17
18
-const isAppleSilicon = (res, useFeatureDetection) => {
+const isAppleSilicon = (res) => {
19
if (res.os.is(OS.MACOS)) {
20
if (res.cpu.is(CPU.ARM)) {
21
return true;
22
}
23
- if (useFeatureDetection) {
+ if (typeof window !== 'undefined') {
24
try {
25
const canvas = document.createElement('canvas');
26
const webgl = canvas.getContext('webgl2') || canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
0 commit comments