From e0a8f066c115c663be8b706d2f30367b52305bbf Mon Sep 17 00:00:00 2001 From: Jay Fong Date: Fri, 16 Nov 2018 09:55:56 +0800 Subject: [PATCH] Fix the env detection of ssr --- 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 07cadd9cf9a..a79cb8d5333 100644 --- a/src/core/util/env.js +++ b/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 }