From a6f1e32c2c1ed5a5206538655f0cc2166cce72e9 Mon Sep 17 00:00:00 2001 From: dalechyn Date: Fri, 11 Oct 2024 03:04:47 +0300 Subject: [PATCH 1/2] fix: check for browser location --- src/frog-base.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frog-base.tsx b/src/frog-base.tsx index c11f2f30..7e52034f 100644 --- a/src/frog-base.tsx +++ b/src/frog-base.tsx @@ -683,7 +683,7 @@ export class FrogBase< basePath: this.basePath, path, }) - if (!renderAsHTML && browser?.name && browserLocation_) + if (!renderAsHTML && browser?.type === 'browser' && browserLocation_) return c.redirect( browserLocation_.startsWith('http') ? browserLocation_ From 1238b62b5d7a10d806665a2da19b3aef5933babf Mon Sep 17 00:00:00 2001 From: dalechyn Date: Fri, 11 Oct 2024 03:06:01 +0300 Subject: [PATCH 2/2] chore: changesets --- .changeset/large-pumas-work.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/large-pumas-work.md diff --git a/.changeset/large-pumas-work.md b/.changeset/large-pumas-work.md new file mode 100644 index 00000000..cd343db9 --- /dev/null +++ b/.changeset/large-pumas-work.md @@ -0,0 +1,5 @@ +--- +"frog": patch +--- + +Fixed an issue with `browserLocation` redirects misleadingly redirecting Twitterbot due to incorrect check.