瀏覽代碼

fix: fix server env detection in wechat mini program (#9075)

Jay Fong 7 年之前
父節點
當前提交
05e8bcfe5d
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/core/util/env.js

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

@@ -41,7 +41,7 @@ export const isServerRendering = () => {
     if (!inBrowser && !inWeex && typeof global !== 'undefined') {
       // detect presence of vue-server-renderer and avoid
       // Webpack shimming the process
-      _isServer = global['process'].env.VUE_ENV === 'server'
+      _isServer = global['process'] && global['process'].env.VUE_ENV === 'server'
     } else {
       _isServer = false
     }