From 70a7d8d6f8e9cf028c8af22419a1a6cdfa6ededb Mon Sep 17 00:00:00 2001 From: ZeroLing Date: Mon, 24 Jul 2023 14:44:16 +0800 Subject: [PATCH] fix: unnecessary escape character --- 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, '') || '/';