mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-01-18 10:46:34 +00:00
Fix error displaying info for devices without commits
Change-type: patch Resolves: #2024 Signed-off-by: Scott Lowe <scott@balena.io>
This commit is contained in:
parent
b9d90b9e38
commit
e0c65bdef8
@ -116,7 +116,10 @@ export default class DeviceCmd extends Command {
|
||||
: 'N/a';
|
||||
|
||||
device.device_type = device.is_of__device_type[0].slug;
|
||||
device.commit = (device.is_running__release as Release[])[0].commit;
|
||||
|
||||
const isRunningRelease = device.is_running__release as Release[];
|
||||
device.commit = isRunningRelease?.[0] ? isRunningRelease[0].commit : 'N/a';
|
||||
|
||||
device.last_seen = device.last_connectivity_event ?? undefined;
|
||||
|
||||
// Memory/Storage are really MiB
|
||||
|
Loading…
Reference in New Issue
Block a user