mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-04-21 13:51:59 +02:00
fix how we check if running in browser, fixes #609
This commit is contained in:
parent
26a67c50c5
commit
1d8aa81460
@ -14,6 +14,7 @@
|
||||
"get-window": "^1.1.1",
|
||||
"immutable": "^3.8.1",
|
||||
"is-empty": "^1.0.0",
|
||||
"is-in-browser": "^1.1.3",
|
||||
"keycode": "^2.1.2",
|
||||
"react-portal": "^3.0.0",
|
||||
"selection-is-backward": "^1.0.0",
|
||||
|
@ -1,4 +1,6 @@
|
||||
|
||||
import browser from 'is-in-browser'
|
||||
|
||||
/**
|
||||
* Browser matching rules.
|
||||
*
|
||||
@ -43,7 +45,7 @@ let OS
|
||||
* Run the matchers when in browser.
|
||||
*/
|
||||
|
||||
if (process.browser) {
|
||||
if (browser) {
|
||||
const { userAgent } = window.navigator
|
||||
|
||||
for (const rule of BROWSER_RULES) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user