system: check if mountpoint is array
This commit is contained in:
+2
-2
@@ -333,8 +333,8 @@ async function getBlockDevices() {
|
||||
size: d.fsavail || 0,
|
||||
type: d.fstype,
|
||||
uuid: d.uuid,
|
||||
rota: d.rota, // false (ssd) true (hdd)
|
||||
mountpoint: d.mountpoints ? d.mountpoints.pop() : d.mountpoint // we only support one mountpoint here old lsblk only exposed one via .mountpoint
|
||||
rota: d.rota, // false (ssd) true (hdd) . unforuntately, this is not set correctly when virtualized (like in DO)
|
||||
mountpoint: Array.isArray(d.mountpoints) ? d.mountpoints[0] : d.mountpoint // we only support one mountpoint here old lsblk only exposed one via .mountpoint
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user