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 e474edb commit dfdb167Copy full SHA for dfdb167
packages/@react-aria/utils/src/platform.ts
@@ -14,10 +14,9 @@ function testUserAgent(re: RegExp) {
14
if (typeof window === 'undefined' || window.navigator == null) {
15
return false;
16
}
17
- return (
18
- window.navigator['userAgentData']?.brands.some((brand: {brand: string, version: string}) => re.test(brand.brand))
19
- ) ||
20
- re.test(window.navigator.userAgent);
+ let brands = window.navigator['userAgentData']?.brands;
+ return Array.isArray(brands) && brands.some((brand: {brand: string, version: string}) => re.test(brand.brand)) ||
+ re.test(window.navigator.userAgent);
21
22
23
function testPlatform(re: RegExp) {
0 commit comments