mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-11 17:53:59 +02:00
bugfix: avoid lookbehind (#5503)
This commit is contained in:
@@ -55,7 +55,8 @@ export const IS_UC_MOBILE =
|
||||
// Wechat browser (not including mac wechat)
|
||||
export const IS_WECHATBROWSER =
|
||||
typeof navigator !== 'undefined' &&
|
||||
/.*(?<!Mac)Wechat/.test(navigator.userAgent)
|
||||
/.*Wechat/.test(navigator.userAgent) &&
|
||||
!/.*MacWechat/.test(navigator.userAgent) // avoid lookbehind (buggy in safari < 16.4)
|
||||
|
||||
// Check if DOM is available as React does internally.
|
||||
// https://github.com/facebook/react/blob/master/packages/shared/ExecutionEnvironment.js
|
||||
|
Reference in New Issue
Block a user