From 33c621fa431582dbb69faa747d1c5fb63b3e2d43 Mon Sep 17 00:00:00 2001 From: Nikita Barsukov Date: Mon, 12 Aug 2024 17:57:21 +0300 Subject: [PATCH] chore(demo): `DocDemo` generates invalid urls during attempts to patch query params (#8480) --- projects/demo/src/modules/app/app.providers.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/projects/demo/src/modules/app/app.providers.ts b/projects/demo/src/modules/app/app.providers.ts index 020bbb58c45c..24c59b89a5b1 100644 --- a/projects/demo/src/modules/app/app.providers.ts +++ b/projects/demo/src/modules/app/app.providers.ts @@ -26,7 +26,6 @@ import { tuiSortPages, } from '@taiga-ui/addon-doc'; import { - TUI_BASE_HREF, TUI_DIALOG_CLOSES_ON_BACK, TUI_IS_E2E, TUI_IS_PLAYWRIGHT, @@ -171,9 +170,8 @@ export const APP_PROVIDERS: Provider[] = [ }, { provide: TUI_DOC_URL_STATE_HANDLER, - deps: [TUI_BASE_HREF], - useFactory: (baseHref: string) => (tree: UrlTree) => - String(tree).replace(baseHref, ''), + useFactory: () => (tree: UrlTree) => + String(tree).replace(/^\/(next|v[0-9]+)\//, ''), }, { provide: TUI_DOC_TYPE_REFERENCE_HANDLER,