diff --git a/src/components/site-picker/site-picker.ts b/src/components/site-picker/site-picker.ts index da4cf8d41..51538eec7 100644 --- a/src/components/site-picker/site-picker.ts +++ b/src/components/site-picker/site-picker.ts @@ -57,6 +57,12 @@ export class CoreSitePickerComponent implements OnInit { })); }); + if (!this.selectedSite && sites.length) { + // There is no current site, select the first one. + this.selectedSite = sites[0].id; + this.siteSelected.emit(this.selectedSite); + } + return Promise.all(promises).then(() => { this.sites = sites; });