diff --git a/projects/player/src/app/pipes/valid-pages.pipe.ts b/projects/player/src/app/pipes/valid-pages.pipe.ts index 2f71854d7eaeb2b4888d403ae8ca9a1a2e466a9e..471304b572e838055769fc481e66fa18299f1d03 100644 --- a/projects/player/src/app/pipes/valid-pages.pipe.ts +++ b/projects/player/src/app/pipes/valid-pages.pipe.ts @@ -14,13 +14,15 @@ export class ValidPagesPipe implements PipeTransform { } private getValidPages(pages: Page[]): Record<string, string> { - return pages.reduce( - (validPages: Record<string, string>, page: Page, index: number) => ({ - ...validPages, - [index.toString(10)]: `${this.translateService.instant( - 'pageIndication', { index: index + 1 } - )}` - }), {} - ); + return pages + .filter((page: Page): boolean => !page.alwaysVisible) + .reduce( + (validPages: Record<string, string>, page: Page, index: number) => ({ + ...validPages, + [index.toString(10)]: `${this.translateService.instant( + 'pageIndication', { index: index + 1 } + )}` + }), {} + ); } }