Only directly callback if the config is not empty

apiServerOrigin is always set if the config was set
This commit is contained in:
Johannes Zellner
2016-04-08 17:29:07 +02:00
parent 5da5d86bc8
commit 2e281f8554

View File

@@ -147,7 +147,7 @@ angular.module('Application').service('Client', ['$http', 'md5', 'Notification',
Client.prototype.onConfig = function (callback) {
this._configListener.push(callback);
callback(this._config);
if (this._config && this._config.apiServerOrigin) callback(this._config);
};
Client.prototype.resetAvatar = function () {
@@ -653,6 +653,7 @@ angular.module('Application').service('Client', ['$http', 'md5', 'Notification',
if (error) return callback(error);
that.setConfig(result);
callback(null);
});
};