From dcd75edb723786a4002f125e633e64c8741ae512 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Mon, 2 Nov 2020 08:08:25 +0100 Subject: [PATCH] ui: fix dashboard subscription Signed-off-by: Thomas Lamprecht --- www/Dashboard.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/Dashboard.js b/www/Dashboard.js index 122aa559..553c2b58 100644 --- a/www/Dashboard.js +++ b/www/Dashboard.js @@ -63,7 +63,9 @@ Ext.define('PBS.Dashboard', { updateSubscription: function(store, records, success) { if (!success) { return; } let me = this; - let subStatus = records[0].data.status === 'Active' ? 2 : 0; // 2 = all good, 1 = different leves, 0 = none + let status = records[0].data.status || 'unknown'; + // 2 = all good, 1 = different leves, 0 = none + let subStatus = status.toLowerCase() === 'active' ? 2 : 0; me.lookup('subscription').setSubStatus(subStatus); },