Skip to content

Commit 638d745

Browse files
committed
fixup! fixup! fix(@angular/ssr): correctly handle auxiliary routes
1 parent 6dd8d32 commit 638d745

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/angular/ssr/src/utils/url.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,9 @@ export function constructUrl(pathname: string, search: string, hash: string): st
264264
* // → '/path/to/resource'
265265
* ```
266266
*/
267+
267268
export function stripAuxiliaryRoutes(pathname: string): string {
268269
const index = pathname.indexOf('(');
270+
269271
return index !== -1 ? pathname.slice(0, index) : pathname;
270272
}

packages/angular/ssr/test/utils/url_spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ import {
1111
addTrailingSlash,
1212
buildPathWithParams,
1313
joinUrlParts,
14+
stripAuxiliaryRoutes,
1415
stripIndexHtmlFromURL,
1516
stripLeadingSlash,
1617
stripMatrixParams,
1718
stripTrailingSlash,
18-
stripAuxiliaryRoutes,
1919
} from '../../src/utils/url';
2020

2121
describe('URL Utils', () => {

0 commit comments

Comments
 (0)