diff --git a/lib/app/client.js b/lib/app/client.js index 30fe630e75..a769426efd 100644 --- a/lib/app/client.js +++ b/lib/app/client.js @@ -178,6 +178,7 @@ async function render (to, from, next) { // Update context const context = getContext({ to, + from, <% if (store) { %>store,<% } %> isClient: true, next: _next.bind(this), diff --git a/lib/app/utils.js b/lib/app/utils.js index 6771b61686..547f46b86a 100644 --- a/lib/app/utils.js +++ b/lib/app/utils.js @@ -103,6 +103,7 @@ export function getContext (context, app) { } if (context.req) ctx.req = context.req if (context.res) ctx.res = context.res + if (context.from) ctx.from = context.from return ctx }