From 07a9da11f4b303323fb0b5abbe57446f4cf790b4 Mon Sep 17 00:00:00 2001 From: "moxey.eth" Date: Sat, 10 Feb 2024 14:39:53 +1100 Subject: [PATCH] fix: reset --- src/farc.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/farc.tsx b/src/farc.tsx index 1f98aee3..aed7cc7f 100644 --- a/src/farc.tsx +++ b/src/farc.tsx @@ -54,6 +54,11 @@ export class Farc< : undefined const context = await getFrameContext(c, previousContext) + if (context.url !== parsePath(c.req.url)) + return c.redirect( + `${context.url}?previousContext=${query.previousContext}`, + ) + const { action, imageAspectRatio, intents } = await handler( context, previousContext, @@ -75,7 +80,6 @@ export class Farc< if (serializedPreviousContext) postSearch.set('previousContext', serializedPreviousContext) - if (context.url !== parsePath(c.req.url)) return c.redirect(context.url) return c.render(