mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-08 08:16:30 +02:00
fix: regular expression for testing Webkit based browser (#5453)
* fix: IS_WEBKIT environment symbol excluding blink based browser * chore: add changeset * fix: prettier --------- Co-authored-by: zhanglixin08 <zhanglixin08@meituan.com>
This commit is contained in:
5
.changeset/khaki-toys-unite.md
Normal file
5
.changeset/khaki-toys-unite.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'slate-react': patch
|
||||
---
|
||||
|
||||
fix regular expression for testing Webkit based browser.
|
@@ -20,7 +20,8 @@ export const IS_FIREFOX =
|
||||
/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent)
|
||||
|
||||
export const IS_WEBKIT =
|
||||
typeof navigator !== 'undefined' && /AppleWebKit/.test(navigator.userAgent)
|
||||
typeof navigator !== 'undefined' &&
|
||||
/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent)
|
||||
|
||||
// "modern" Edge was released at 79.x
|
||||
export const IS_EDGE_LEGACY =
|
||||
|
Reference in New Issue
Block a user