From cd262ff8578404c515d8d345098a6e72611890f8 Mon Sep 17 00:00:00 2001 From: Derrick Reimer Date: Fri, 3 Jan 2025 16:50:55 -0600 Subject: [PATCH] More resilient logic for stripping origin from page URLs --- packages/core/src/response.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/response.ts b/packages/core/src/response.ts index 4b905b666..1ad7f5ef2 100644 --- a/packages/core/src/response.ts +++ b/packages/core/src/response.ts @@ -233,7 +233,7 @@ export class Response { setHashIfSameUrl(this.requestParams.all().url, responseUrl) - return responseUrl.href.split(responseUrl.host).pop() + return responseUrl.pathname + responseUrl.search + responseUrl.hash } protected mergeProps(pageResponse: Page): void {