mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-08 16:26:29 +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)
|
/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent)
|
||||||
|
|
||||||
export const IS_WEBKIT =
|
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
|
// "modern" Edge was released at 79.x
|
||||||
export const IS_EDGE_LEGACY =
|
export const IS_EDGE_LEGACY =
|
||||||
|
Reference in New Issue
Block a user