Do not show the update page if update failed

This commit is contained in:
Johannes Zellner
2015-07-29 14:15:44 +02:00
parent 3027c119fe
commit 89c36ae6a9
2 changed files with 3 additions and 5 deletions

View File

@@ -32,7 +32,7 @@ angular.module('Application').service('Client', ['$http', 'md5', 'Notification',
return callback(new ClientError(status, data));
}
if (result.update) window.location.href = '/update.html';
if (result.update && result.update.percent !== -1) window.location.href = '/update.html';
else callback(new ClientError(status, data));
}, function (data, status) {
client.error(data);