Prevent angular erros if app is null in some filter

This commit is contained in:
Johannes Zellner
2019-09-18 18:06:03 +02:00
parent 6ec2a5ea35
commit f03fe33b1f
+3
View File
@@ -199,18 +199,21 @@ app.filter('installError', function () {
app.filter('activeTask', function () {
return function (app) {
if (!app) return false;
return app.taskId !== null;
};
});
app.filter('installSuccess', function () {
return function (app) {
if (!app) return false;
return app.installationState === ISTATES.INSTALLED;
};
});
app.filter('appIsInstalledAndHealthy', function () {
return function (app) {
if (!app) return false;
return (app.installationState === ISTATES.INSTALLED && app.health === HSTATES.HEALTHY);
};
});