Skip to content

Commit

Permalink
chore: test new regex
Browse files Browse the repository at this point in the history
  • Loading branch information
hasan-deriv committed Apr 15, 2024
1 parent fba5af8 commit 7483513
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/shared/src/utils/os/os_detect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,13 @@ export const mobileOSDetectAsync = async () => {
if (navigator?.userAgentData) {
const ua = await navigator.userAgentData.getHighEntropyValues(['model']);
// eslint-disable-next-line no-console
console.log('==>', ua?.model && regex.test(ua.model) && regex2.test(ua.model) && regex3.test(ua.model));
console.log(
'==>',
ua?.model,
regex.test(ua?.model || ''),
regex2.test(ua?.model || ''),
regex3.test(ua?.model || '')
);
if (ua?.model && regex.test(ua.model) && regex2.test(ua.model) && regex3.test(ua.model)) {
return 'huawei';
}
Expand Down

0 comments on commit 7483513

Please sign in to comment.