From af2175aa7a98f38680612d863ab59b02da31e152 Mon Sep 17 00:00:00 2001 From: Joseph Mory Date: Thu, 12 Dec 2024 14:52:02 +0000 Subject: [PATCH] luci-app-hd-idle: Check disk opt value Signed-off-by: Joseph Mory --- .../htdocs/luci-static/resources/view/hd_idle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/luci-app-hd-idle/htdocs/luci-static/resources/view/hd_idle.js b/applications/luci-app-hd-idle/htdocs/luci-static/resources/view/hd_idle.js index 247841e7827..b3df08913a5 100644 --- a/applications/luci-app-hd-idle/htdocs/luci-static/resources/view/hd_idle.js +++ b/applications/luci-app-hd-idle/htdocs/luci-static/resources/view/hd_idle.js @@ -9,7 +9,7 @@ function disk(devs, options, section_id) { var disk = devs.find(function(itm){ return itm.name == v; }); var out = ''; if(disk != undefined){ - out = options.map(function(opt){ return disk[opt].trim(); }); + out = options.map(function(opt){ return disk[opt]?.trim() || null; }); out = out.filter(function(o){ return o != ''; }); out = out.join(' '); }