1
0
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:
LLwill
2025-07-11 07:31:39 +08:00
committed by GitHub
parent f2ea1e1e3a
commit 5fdd83e2ff

View File

@@ -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 = !!(