Skip to content

Commit 649f219

Browse files
committed
use better context injection for 2.3
1 parent 24812a8 commit 649f219

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/component-normalizer.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ module.exports = function normalizeComponent (
3939
var hook
4040
if (moduleIdentifier) { // server build
4141
hook = function (context) {
42-
// context is injected if this is a cached call
42+
// 2.3 injection
43+
context = context || (this.$vnode && this.$vnode.ssrContext)
44+
// 2.2 with runInNewContext: true
4345
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
4446
context = __VUE_SSR_CONTEXT__
4547
}

0 commit comments

Comments
 (0)