MOBILE-2795 core: Select first site in site picker if no current
parent
971aebd658
commit
e77916a9bb
|
@ -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;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue