1
0
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

This commit is contained in:
Ian Storm Taylor 2017-03-03 13:11:38 -08:00
parent 26a67c50c5
commit 1d8aa81460
2 changed files with 4 additions and 1 deletions

@ -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) {