Просмотр исходного кода

fix browser env detection for jsdom in Node 7

Evan You 9 лет назад
Родитель
Сommit
e89830230c
1 измененных файлов с 1 добавлено и 4 удалено
  1. 1 4
      src/core/util/env.js

+ 1 - 4
src/core/util/env.js

@@ -7,10 +7,7 @@ import { noop } from 'shared/util'
 export const hasProto = '__proto__' in {}
 
 // Browser environment sniffing
-export const inBrowser =
-  typeof window !== 'undefined' &&
-  Object.prototype.toString.call(window) !== '[object Object]'
-
+export const inBrowser = typeof window !== 'undefined'
 export const UA = inBrowser && window.navigator.userAgent.toLowerCase()
 export const isIE = UA && /msie|trident/.test(UA)
 export const isIE9 = UA && UA.indexOf('msie 9.0') > 0