Explicitly set icon urls to null if we dont have them

This commit is contained in:
Johannes Zellner
2016-01-20 16:01:21 +01:00
parent a5ba3faa49
commit 2d930b9c3d

View File

@@ -413,8 +413,8 @@ angular.module('Application').service('Client', ['$http', 'md5', 'Notification',
Client.prototype.getAppIconUrls = function (app) {
return {
cloudron: this.apiOrigin + app.iconUrl + '?access_token=' + this._token,
store: this._config.apiServerOrigin + '/api/v1/apps/' + app.appStoreId + '/versions/' + app.manifest.version + '/icon'
cloudron: app.iconUrl ? (this.apiOrigin + app.iconUrl + '?access_token=' + this._token) : null,
store: app.appStoreId ? (this._config.apiServerOrigin + '/api/v1/apps/' + app.appStoreId + '/versions/' + app.manifest.version + '/icon') : null
};
};