Fix is wechat function (#133)
Co-authored-by: AceDataCloud <office@acedata.cloud>
This commit is contained in:
1 parent
64d3f8f4f4
commit
d5b58bb1ce
2 files changed
+9
-1
No files matched your search
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"type": "patch",
|
||||
"comment": "fix is wechat browser",
|
||||
"packageName": "@acedatacloud/nexior",
|
||||
"email": "office@acedata.cloud",
|
||||
"dependentChangeType": "patch"
|
||||
}
|
||||
+2
-1
@@ -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');
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user