Skip to content

Commit b1c7dfc

Browse files
committed
[submodule:helpers] Revert providing extra param in isAppleSilicon() and just check for window instead
1 parent 2b125c8 commit b1c7dfc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/helpers/ua-parser-helpers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ const { isStandalonePWA } = require('is-standalone-pwa');
1515

1616
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;
1717

18-
const isAppleSilicon = (res, useFeatureDetection) => {
18+
const isAppleSilicon = (res) => {
1919
if (res.os.is(OS.MACOS)) {
2020
if (res.cpu.is(CPU.ARM)) {
2121
return true;
2222
}
23-
if (useFeatureDetection) {
23+
if (typeof window !== 'undefined') {
2424
try {
2525
const canvas = document.createElement('canvas');
2626
const webgl = canvas.getContext('webgl2') || canvas.getContext('webgl') || canvas.getContext('experimental-webgl');

0 commit comments

Comments
 (0)