From 2e281f8554b9d4e77e236679a7967728c38544c2 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Fri, 8 Apr 2016 17:29:07 +0200 Subject: [PATCH] Only directly callback if the config is not empty apiServerOrigin is always set if the config was set --- webadmin/src/js/client.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webadmin/src/js/client.js b/webadmin/src/js/client.js index b740434c6..eb301ee7c 100644 --- a/webadmin/src/js/client.js +++ b/webadmin/src/js/client.js @@ -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); }); };