diff --git a/change/@acedatacloud-nexior-0b8a2d5d-beca-4da4-9610-15183038db07.json b/change/@acedatacloud-nexior-0b8a2d5d-beca-4da4-9610-15183038db07.json new file mode 100644 index 00000000..7f6a215b --- /dev/null +++ b/change/@acedatacloud-nexior-0b8a2d5d-beca-4da4-9610-15183038db07.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix is wechat browser", + "packageName": "@acedatacloud/nexior", + "email": "office@acedata.cloud", + "dependentChangeType": "patch" +} diff --git a/src/utils/is.ts b/src/utils/is.ts index df7cc95e..545ddb2c 100644 --- a/src/utils/is.ts +++ b/src/utils/is.ts @@ -17,7 +17,8 @@ export const isJSONString = (str: string): boolean => { * Check if the string is wechat browser */ export const isWechatBrowser = (): boolean => { - return /micromessenger/i.test(navigator.userAgent); + const ua = navigator.userAgent.toLowerCase(); + return ua.includes('micromessenger'); }; /**