1
0
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:
John Mitchell 2015-11-03 22:39:39 -05:00
parent e05988ff5d
commit ecb445e688

View File

@ -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');
});
});