diff --git a/lib/app/utils.js b/lib/app/utils.js index a091740125..e5d05b0a1a 100644 --- a/lib/app/utils.js +++ b/lib/app/utils.js @@ -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 || {}