From e9c00737d02e1c0eb10bb22646400f7600f373de Mon Sep 17 00:00:00 2001 From: ZeroLing Date: Mon, 24 Jul 2023 17:38:21 +0800 Subject: [PATCH] fix: unnecessary escape character (#6411) --- packages/runtime/src/runServerApp.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/runtime/src/runServerApp.tsx b/packages/runtime/src/runServerApp.tsx index d6f0b36107..cc69ccb214 100644 --- a/packages/runtime/src/runServerApp.tsx +++ b/packages/runtime/src/runServerApp.tsx @@ -491,7 +491,7 @@ function renderDocument(options: RenderDocumentOptions): Response { /** * ref: https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/server.tsx */ -const REGEXP_WITH_HOSTNAME = /^https?:\/\/[^\/]+/i; +const REGEXP_WITH_HOSTNAME = /^https?:\/\/[^/]+/i; function getLocation(url: string) { // In case of invalid URL, provide a default base url. const locationPath = url.replace(REGEXP_WITH_HOSTNAME, '') || '/';