Prevent angular errors when there is no appError.app set yet

This commit is contained in:
Johannes Zellner
2019-09-07 09:24:39 +02:00
parent 2e60a9d43c
commit 84dec337f0
3 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -214,8 +214,10 @@ app.filter('activeOAuthClients', function () {
});
// this appears when an item in app grid is clicked
app.filter('prettyAppMessage', function () {
app.filter('prettyAppErrorMessage', function () {
return function (app) {
if (!app) return '';
if (app.installationState === ISTATES.INSTALLED) {
// app.health can also be null to indicate insufficient data
if (app.health === HSTATES.UNHEALTHY) return 'The app is not responding to health checks. Check the logs for any error messages.';