mirror of
https://github.com/withastro/astro.git
synced 2025-02-10 22:38:53 -05:00
refactor: simplify error check
This commit is contained in:
parent
f89ace4947
commit
bad5c7f236
1 changed files with 3 additions and 3 deletions
|
@ -78,10 +78,10 @@ async function renderResult({
|
|||
const response = await next();
|
||||
context.cookies.delete(ACTION_QUERY_PARAMS.actionPayload);
|
||||
|
||||
if (locals._actionPayload.actionResult.type === 'error') {
|
||||
if (actionResult.type === 'error') {
|
||||
return new Response(response.body, {
|
||||
status: locals._actionPayload.actionResult.status,
|
||||
statusText: locals._actionPayload.actionResult.type,
|
||||
status: actionResult.status,
|
||||
statusText: actionResult.type,
|
||||
headers: response.headers,
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue