From 246275e203836d4c0e99f4d54fe79e829eea2d84 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Fri, 27 May 2022 10:59:25 +0200 Subject: [PATCH] ui: datastore options: avoid breakage if active-ops cannot be queried Signed-off-by: Thomas Lamprecht --- www/datastore/OptionView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/datastore/OptionView.js b/www/datastore/OptionView.js index b6249afa8..4cfafccf0 100644 --- a/www/datastore/OptionView.js +++ b/www/datastore/OptionView.js @@ -34,8 +34,8 @@ Ext.define('PBS.Datastore.Options', { view.mon(me.activeOperationsRstore, 'load', (store, data, success) => { let activeTasks = me.getView().maintenanceActiveTasks; - activeTasks.read = data[0].data.value; - activeTasks.write = data[1].data.value; + activeTasks.read = data?.[0]?.data.value ?? 0; + activeTasks.write = data?.[1]?.data.value ?? 0; }); },