mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
context: Add on client-side
This commit is contained in:
parent
d1d631a88e
commit
03aa65a888
@ -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),
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user