Skip to content

Commit

Permalink
Merge pull request #1655 from didi/fix-api-proxy-v7
Browse files Browse the repository at this point in the history
fix ua无括号getSystemInfoSync报错的问题
  • Loading branch information
Blackgan3 authored Oct 16, 2024
2 parents 1837613 + bd9d55f commit cb720ac
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 cb720ac

Please sign in to comment.