Skip to content

Commit e898302

Browse files
committed
fix browser env detection for jsdom in Node 7
1 parent 26b6374 commit e898302

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/core/util/env.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ import { noop } from 'shared/util'
77
export const hasProto = '__proto__' in {}
88

99
// Browser environment sniffing
10-
export const inBrowser =
11-
typeof window !== 'undefined' &&
12-
Object.prototype.toString.call(window) !== '[object Object]'
13-
10+
export const inBrowser = typeof window !== 'undefined'
1411
export const UA = inBrowser && window.navigator.userAgent.toLowerCase()
1512
export const isIE = UA && /msie|trident/.test(UA)
1613
export const isIE9 = UA && UA.indexOf('msie 9.0') > 0

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy