From addb461e3c8c9b2041c0f44892cdb58a40b26b64 Mon Sep 17 00:00:00 2001 From: Evan You Date: Fri, 7 Oct 2016 17:42:42 -0400 Subject: [PATCH] fix ssr bundle renderer error on commonjs exports (fix #3867) --- src/server/run-in-vm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/run-in-vm.js b/src/server/run-in-vm.js index cddee0cc..530939b9 100644 --- a/src/server/run-in-vm.js +++ b/src/server/run-in-vm.js @@ -30,7 +30,7 @@ export default function runInVm (code, _context = {}) { compiledWrapper.call(m.exports, m.exports, require, m) const res = Object.prototype.hasOwnProperty.call(m.exports, 'default') ? m.exports.default - : m + : m.exports resolve(typeof res === 'function' ? res(_context) : res) }) }