mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
ctx => app.context
This commit is contained in:
parent
aefa9f8c31
commit
5384ee1a5c
@ -125,7 +125,7 @@ export async function setContext(app, context) {
|
||||
if (context.res) app.context.res = context.res
|
||||
app.context.redirect = function (status, path, query) {
|
||||
if (!status) return
|
||||
ctx._redirected = true // Used in middleware
|
||||
app.context._redirected = true // Used in middleware
|
||||
// if only 1 or 2 arguments: redirect('/') or redirect('/', { foo: 'bar' })
|
||||
if (typeof status === 'string' && (typeof path === 'undefined' || typeof path === 'object')) {
|
||||
query = path || {}
|
||||
|
Loading…
Reference in New Issue
Block a user