Commit 09fb02e
committed
refactor: inline getRoutePathnameForBaseHref wrapper
The new helper added in #3195 was a 1-line shim around
`getPathnameFromRequestUrl(req.url)` used in only two adjacent functions
(`shouldInjectSlashlessRootRedirect` and `getPublicBaseHref`). The
existing `getPathnameFromRequestUrl` already conveys the intent, and the
two callsites read clearly without the extra layer.
Behavior-preserving: each callsite continues to compute the same pathname
(or null) it did before. All 52 tests in src/node/orpc/server.test.ts
continue to pass.1 parent 50b2b25 commit 09fb02e
1 file changed
Lines changed: 2 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
593 | 593 | | |
594 | 594 | | |
595 | 595 | | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | 596 | | |
601 | 597 | | |
602 | 598 | | |
| |||
605 | 601 | | |
606 | 602 | | |
607 | 603 | | |
608 | | - | |
| 604 | + | |
609 | 605 | | |
610 | 606 | | |
611 | 607 | | |
| |||
617 | 613 | | |
618 | 614 | | |
619 | 615 | | |
620 | | - | |
| 616 | + | |
621 | 617 | | |
622 | 618 | | |
623 | 619 | | |
| |||
0 commit comments