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.
1 parent c9cfc2a commit 98475d3Copy full SHA for 98475d3
1 file changed
src/Device.ts
@@ -706,7 +706,10 @@ function getChromiumMajorVersion(
706
// Some nasty browser extensions define their own custom
707
// navigator.userAgentData without mandatory `brands` field, so let's be
708
// ready for it.
709
- const chromiumBrand = (userAgentData.brands ?? []).find(
+ const brands = Array.isArray(userAgentData.brands)
710
+ ? userAgentData.brands
711
+ : [];
712
+ const chromiumBrand = brands.find(
713
b => b.brand === 'Chromium'
714
);
715
0 commit comments