From f964406c279183caa95da279ec05f2355d63feae Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Thu, 3 May 2018 12:18:05 -0700 Subject: [PATCH] fix: set rootUrl during construction of table of contents (#445) --- src/app/shared/table-of-contents/table-of-contents.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/shared/table-of-contents/table-of-contents.ts b/src/app/shared/table-of-contents/table-of-contents.ts index 952e9bf90bb6..e2de7dfc7de4 100644 --- a/src/app/shared/table-of-contents/table-of-contents.ts +++ b/src/app/shared/table-of-contents/table-of-contents.ts @@ -33,7 +33,7 @@ export class TableOfContents implements OnInit { @Input() container: string; @Input() headerSelectors = '.docs-markdown-h3,.docs-markdown-h4'; - _rootUrl: string; + _rootUrl = this._router.url.split('#')[0]; private _scrollContainer: any; private _destroyed = new Subject(); private _urlFragment = '';