소스 검색

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
     }