diff options
Diffstat (limited to 'client/src/app/+about/about-peertube')
-rw-r--r-- | client/src/app/+about/about-peertube/about-peertube.component.ts | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/client/src/app/+about/about-peertube/about-peertube.component.ts b/client/src/app/+about/about-peertube/about-peertube.component.ts index 98c5f93c3..b175a41bc 100644 --- a/client/src/app/+about/about-peertube/about-peertube.component.ts +++ b/client/src/app/+about/about-peertube/about-peertube.component.ts | |||
@@ -8,11 +8,17 @@ import { ViewportScroller } from '@angular/common' | |||
8 | }) | 8 | }) |
9 | 9 | ||
10 | export class AboutPeertubeComponent implements AfterViewChecked { | 10 | export class AboutPeertubeComponent implements AfterViewChecked { |
11 | private lastScrollHash: string | ||
12 | |||
11 | constructor ( | 13 | constructor ( |
12 | private viewportScroller: ViewportScroller | 14 | private viewportScroller: ViewportScroller |
13 | ) {} | 15 | ) {} |
14 | 16 | ||
15 | ngAfterViewChecked () { | 17 | ngAfterViewChecked () { |
16 | if (window.location.hash) this.viewportScroller.scrollToAnchor(window.location.hash.replace('#', '')) | 18 | if (window.location.hash && window.location.hash !== this.lastScrollHash) { |
19 | this.viewportScroller.scrollToAnchor(window.location.hash.replace('#', '')) | ||
20 | |||
21 | this.lastScrollHash = window.location.hash | ||
22 | } | ||
17 | } | 23 | } |
18 | } | 24 | } |