diff --git a/packages/integrations/react/server.js b/packages/integrations/react/server.js index 9c3c309cc0..f9ad5e4f97 100644 --- a/packages/integrations/react/server.js +++ b/packages/integrations/react/server.js @@ -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];