From 6e7977997e35105697fa358d53802e7c3b828cb5 Mon Sep 17 00:00:00 2001 From: badbl0cks <4161747+badbl0cks@users.noreply.github.com> Date: Thu, 2 Jul 2026 11:48:35 -0700 Subject: [PATCH] Fix contact form action processing for "reset" being nested incorrectly --- src/actions/contact.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/actions/contact.ts b/src/actions/contact.ts index b69426c..6822f4b 100644 --- a/src/actions/contact.ts +++ b/src/actions/contact.ts @@ -167,20 +167,20 @@ const submitActionDefinition = { return { nextAction: "complete", }; - } else if (input.action === "reset") { - context.session?.delete("phone"); - context.session?.delete("name"); - context.session?.delete("msg"); - - return { - nextAction: "send_otp", - }; } throw new ActionError({ code: "SERVICE_UNAVAILABLE", message: "Message failed to send.", }); + } else if (input.action === "reset") { + context.session?.delete("phone"); + context.session?.delete("name"); + context.session?.delete("msg"); + + return { + nextAction: "send_otp", + }; } }, };