From d8f61b7cdfdd0ee041748d2264a2d4000dc9646e Mon Sep 17 00:00:00 2001 From: dangered wolf Date: Sat, 16 Jul 2022 16:20:11 -0400 Subject: [PATCH] Fix bug in profile handling code --- src/server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server.ts b/src/server.ts index 8fb0dcb..56fb794 100644 --- a/src/server.ts +++ b/src/server.ts @@ -64,7 +64,7 @@ const profileRequest = async (request: any, _event: FetchEvent) => { const { handle } = request.params; const url = new URL(request.url); - if (handle.match(/[a-z0-9_]{1,15}/gi) !== handle) { + if (handle.match(/[a-z0-9_]{1,15}/gi)[0] !== handle) { return Response.redirect(Constants.REDIRECT_URL, 302); } else { return Response.redirect(`${Constants.TWITTER_ROOT}${url.pathname}`, 302);