From c7d8b7f0d7a21553738a686b1b3eebe5aa25d87f Mon Sep 17 00:00:00 2001 From: Hanks Date: Wed, 3 Jan 2018 17:50:35 +0800 Subject: [PATCH] Fix the env detection of server side rendering In Weex, `global` is exist, but `global.process` is not. --- src/core/util/env.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/util/env.js b/src/core/util/env.js index dc332e280dc..07cadd9cf9a 100644 --- a/src/core/util/env.js +++ b/src/core/util/env.js @@ -38,7 +38,7 @@ let _isServer export const isServerRendering = () => { if (_isServer === undefined) { /* istanbul ignore if */ - if (!inBrowser && typeof global !== 'undefined') { + 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'