From 03aa65a888354bb67241226dcd7a6c04e1f23ed3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Thu, 20 Jul 2017 21:04:23 +0200 Subject: [PATCH] context: Add on client-side --- lib/app/client.js | 1 + lib/app/utils.js | 1 + 2 files changed, 2 insertions(+) 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 }