MOBILE-2744 ionic: Fix uncaught promises

main
Pau Ferrer Ocaña 2018-11-27 10:43:31 +01:00
parent 82c8c5cdaf
commit b39cbd338f
2 changed files with 6 additions and 2 deletions

View File

@ -61,7 +61,9 @@ export class AddonRemoteThemesProvider {
hash: ''
};
return this.load(siteId, true);
return this.load(siteId, true).catch((error) => {
this.logger.error('Error loading site after site init', error);
});
}
/**

View File

@ -102,7 +102,9 @@ export class AddonRemoteThemesModule {
// Load temporary styles when site config is checked in login.
eventsProvider.on(CoreEventsProvider.LOGIN_SITE_CHECKED, (data) => {
remoteThemesProvider.loadTmpStyles(data.config.mobilecssurl);
remoteThemesProvider.loadTmpStyles(data.config.mobilecssurl).catch((error) => {
logger.error('Error loading tmp styles', error);
});
});
// Unload temporary styles when site config is "unchecked" in login.