Explorar el Código

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

Jay Fong hace 7 años
padre
commit
05e8bcfe5d
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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
     }