Skip to content

Commit

Permalink
fix ua无括号getSystemInfoSync报错的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
wangcuijuan committed Oct 16, 2024
1 parent e875e7f commit bd9d55f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/api-proxy/src/platform/api/system/index.web.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function getSystemInfoSync () {
throwSSRWarning('getSystemInfoSync API is running in non browser environments')
return
}
const ua = navigator.userAgent.split('(')[1].split(')')[0]
const ua = navigator.userAgent.split('(')[1]?.split(')')[0] || ''
const phones = new Map([
['iPhone', /iPhone|iPad|iPod|iOS/i],
['Huawei', /huawei/i],
Expand Down

0 comments on commit bd9d55f

Please sign in to comment.