Skip to content

Commit

Permalink
fix: reset
Browse files Browse the repository at this point in the history
  • Loading branch information
jxom committed Feb 10, 2024
1 parent ac0496c commit 07a9da1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/farc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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(
<html lang="en">
<head>
Expand Down

0 comments on commit 07a9da1

Please sign in to comment.