mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-30 18:39:51 +02:00
fix: Determine the higher version of WeChat browser for Windows (#5913)
* fix: Determine the higher version of WeChat browser for Windows * fix: judgment logic optimization
This commit is contained in:
@@ -52,8 +52,8 @@ export const IS_UC_MOBILE =
|
||||
export const IS_WECHATBROWSER =
|
||||
typeof navigator !== 'undefined' &&
|
||||
/.*Wechat/.test(navigator.userAgent) &&
|
||||
!/.*MacWechat/.test(navigator.userAgent) // avoid lookbehind (buggy in safari < 16.4)
|
||||
|
||||
!/.*MacWechat/.test(navigator.userAgent) && // avoid lookbehind (buggy in safari < 16.4)
|
||||
(!IS_CHROME || IS_CHROME_LEGACY) // wechat and low chrome is real wechat
|
||||
// Check if DOM is available as React does internally.
|
||||
// https://github.com/facebook/react/blob/master/packages/shared/ExecutionEnvironment.js
|
||||
export const CAN_USE_DOM = !!(
|
||||
|
Reference in New Issue
Block a user