mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-20 22:23:07 +00:00
Merge pull request #2026 from balena-io/fix-device-issue
Fix error displaying info for devices without commits
This commit is contained in:
commit
bd5bf0135a
@ -116,7 +116,10 @@ export default class DeviceCmd extends Command {
|
|||||||
: 'N/a';
|
: 'N/a';
|
||||||
|
|
||||||
device.device_type = device.is_of__device_type[0].slug;
|
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;
|
device.last_seen = device.last_connectivity_event ?? undefined;
|
||||||
|
|
||||||
// Memory/Storage are really MiB
|
// Memory/Storage are really MiB
|
||||||
|
Loading…
Reference in New Issue
Block a user