diff --git a/src/components/tabs/tab.ts b/src/components/tabs/tab.ts index 9006b3011..fc4aaf2fc 100644 --- a/src/components/tabs/tab.ts +++ b/src/components/tabs/tab.ts @@ -128,6 +128,8 @@ export class CoreTabComponent implements OnInit, OnDestroy { }); this.tabs.showHideTabs(scroll); + }).catch(() => { + // Ignore errors. }); } diff --git a/src/core/block/components/course-blocks/course-blocks.ts b/src/core/block/components/course-blocks/course-blocks.ts index 574dc3c8b..7db1ffa8c 100644 --- a/src/core/block/components/course-blocks/course-blocks.ts +++ b/src/core/block/components/course-blocks/course-blocks.ts @@ -67,6 +67,10 @@ export class CoreBlockCourseBlocksComponent implements OnInit, OnDestroy { * Setup scrolling. */ protected initScroll(): void { + if (this.blocks.length <= 0) { + return; + } + const scroll: HTMLElement = this.content && this.content.getScrollElement(); this.domUtils.waitElementToExist(() => scroll && scroll.querySelector('.core-course-blocks-side')).then((sideElement) => { @@ -89,6 +93,8 @@ export class CoreBlockCourseBlocksComponent implements OnInit, OnDestroy { this.sideScroll.classList.remove('core-course-blocks-fixed-bottom'); this.scrollWorking = false; } + }).catch(() => { + // Ignore errors. }); }