From 2a09db3094a777878f7e2ff97ca6efb382b50009 Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 9 Dec 2024 16:37:12 +0700 Subject: [PATCH] Fix when no result --- packages/integrations/react/server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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];