mirror of
https://github.com/withastro/astro.git
synced 2024-12-30 22:03:56 -05:00
Fix when no result
This commit is contained in:
parent
e21c7e67fd
commit
2a09db3094
1 changed files with 1 additions and 1 deletions
|
@ -85,7 +85,7 @@ async function renderToStaticMarkup(Component, props, { default: children, ...sl
|
|||
value: newChildren,
|
||||
});
|
||||
}
|
||||
const formState = this ? await getFormState(this) : undefined;
|
||||
const formState = this?.result ? await getFormState(this) : undefined;
|
||||
if (formState) {
|
||||
attrs['data-action-result'] = JSON.stringify(formState[0]);
|
||||
attrs['data-action-key'] = formState[1];
|
||||
|
|
Loading…
Reference in a new issue