fix drive status undefined

Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
si458 2024-01-27 12:42:27 +00:00
parent cd48909dcb
commit 8547de340c

View File

@ -12075,7 +12075,7 @@
} }
if(hardware.windows && hardware.windows.drives && m.Model){ if(hardware.windows && hardware.windows.drives && m.Model){
const foundObject = hardware.windows.drives.find(obj => obj['Model'] === m.Model); const foundObject = hardware.windows.drives.find(obj => obj['Model'] === m.Model);
if(foundObject) x += addDetailItem("Status", EscapeHtml(foundObject.Status), s); if(foundObject && foundObject.Status) x += addDetailItem("Status", EscapeHtml(foundObject.Status), s);
} }
x += '</div>'; x += '</div>';
} }