MOBILE-2722 sitehome: Reset blocks list when not suported

main
Pau Ferrer Ocaña 2018-12-21 13:28:47 +01:00
parent abddc4766d
commit 84d6ea5118
1 changed files with 1 additions and 1 deletions

View File

@ -158,6 +158,7 @@ export class CoreSiteHomeIndexComponent implements OnInit {
if (canGetBlocks) { if (canGetBlocks) {
this.domUtils.showErrorModal(error); this.domUtils.showErrorModal(error);
} }
this.blocks = [];
// Cannot get the blocks, just show site main menu if needed. // Cannot get the blocks, just show site main menu if needed.
if (sections[0] && this.courseHelper.sectionHasContent(sections[0])) { if (sections[0] && this.courseHelper.sectionHasContent(sections[0])) {
@ -166,7 +167,6 @@ export class CoreSiteHomeIndexComponent implements OnInit {
}); });
this.hasSupportedBlock = true; this.hasSupportedBlock = true;
} else { } else {
this.blocks = [];
this.hasSupportedBlock = false; this.hasSupportedBlock = false;
} }
}); });