show load language error only when language resource does not exist in cache

This commit is contained in:
MaysWind 2019-08-20 21:09:46 +08:00
parent d34aa1ea83
commit d63058c3e0

View file

@ -115,10 +115,12 @@
return deferred.resolve(languageObject); return deferred.resolve(languageObject);
}).catch(function onError(response) { }).catch(function onError(response) {
ariaNgLogService.warn('[ariaNgLanguageLoader] cannot get language resource'); ariaNgLogService.warn('[ariaNgLanguageLoader] cannot get language resource');
if (!languageResource) {
ariaNgNotificationService.notifyInPage('', 'AriaNg cannot get language resources, and will display in default language.', { ariaNgNotificationService.notifyInPage('', 'AriaNg cannot get language resources, and will display in default language.', {
type: 'error', type: 'error',
delay: false delay: false
}); });
}
return deferred.reject(options.key); return deferred.reject(options.key);
}); });