Skip to content

Commit

Permalink
Merge pull request #2164 from inertiajs/fix-page-url-edge-case
Browse files Browse the repository at this point in the history
More resilient logic for stripping the origin from page URLs
  • Loading branch information
joetannenbaum authored Jan 8, 2025
2 parents d5ae817 + cd262ff commit 3ac2fc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 3ac2fc8

Please sign in to comment.