Skip to content

Commit

Permalink
luci-app-hd-idle: Check disk opt value
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Mory <[email protected]>
  • Loading branch information
morytyann authored and systemcrash committed Dec 12, 2024
1 parent e15c190 commit af2175a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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(' ');
}
Expand Down

0 comments on commit af2175a

Please sign in to comment.