mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 08:21:15 +03:00
dont resolve a promise that hasnt been set up
This commit is contained in:
parent
e05988ff5d
commit
ecb445e688
@ -39,19 +39,25 @@ angular.module('LoadConfigHelper', ['Utilities'])
|
||||
if(angular.isObject(response.data)){
|
||||
$AnsibleConfig = _.extend($AnsibleConfig, response.data);
|
||||
Store('AnsibleConfig', $AnsibleConfig);
|
||||
$rootScope.loginConfig.resolve('config loaded');
|
||||
if ($rootScope.loginConfig) {
|
||||
$rootScope.loginConfig.resolve('config loaded');
|
||||
}
|
||||
$rootScope.$emit('ConfigReady');
|
||||
}
|
||||
else {
|
||||
$log.info('local_settings.json is not a valid object');
|
||||
$rootScope.loginConfig.resolve('config loaded');
|
||||
if ($rootScope.loginConfig) {
|
||||
$rootScope.loginConfig.resolve('config loaded');
|
||||
}
|
||||
$rootScope.$emit('ConfigReady');
|
||||
}
|
||||
|
||||
}, function() {
|
||||
//local_settings.json not found
|
||||
$log.info('local_settings.json not found');
|
||||
$rootScope.loginConfig.resolve('config loaded');
|
||||
if ($rootScope.loginConfig) {
|
||||
$rootScope.loginConfig.resolve('config loaded');
|
||||
}
|
||||
$rootScope.$emit('ConfigReady');
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user