mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 16:51:11 +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)){
|
if(angular.isObject(response.data)){
|
||||||
$AnsibleConfig = _.extend($AnsibleConfig, response.data);
|
$AnsibleConfig = _.extend($AnsibleConfig, response.data);
|
||||||
Store('AnsibleConfig', $AnsibleConfig);
|
Store('AnsibleConfig', $AnsibleConfig);
|
||||||
$rootScope.loginConfig.resolve('config loaded');
|
if ($rootScope.loginConfig) {
|
||||||
|
$rootScope.loginConfig.resolve('config loaded');
|
||||||
|
}
|
||||||
$rootScope.$emit('ConfigReady');
|
$rootScope.$emit('ConfigReady');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$log.info('local_settings.json is not a valid object');
|
$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');
|
$rootScope.$emit('ConfigReady');
|
||||||
}
|
}
|
||||||
|
|
||||||
}, function() {
|
}, function() {
|
||||||
//local_settings.json not found
|
//local_settings.json not found
|
||||||
$log.info('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');
|
$rootScope.$emit('ConfigReady');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user