mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-19 03:06:27 +00:00
Filter both null and omitted values
The docker daemon can sometimes return null for various fields, or omit the field altogether. The best thing to do with using the docker api is to always use == null to cover both instances. Change-type: patch Signed-off-by: Roman Mazur <roman@balena.io>
This commit is contained in:
parent
4b56022d93
commit
4688524e45
@ -155,8 +155,8 @@ export class LocalModeManager {
|
||||
return new EngineSnapshot(
|
||||
[inspectInfo.Id],
|
||||
[inspectInfo.Image],
|
||||
inspectInfo.Mounts.filter(m => m.Name !== undefined).map(m => m.Name!),
|
||||
_.values(inspectInfo.NetworkSettings.Networks).map(ns => ns.NetworkID),
|
||||
inspectInfo.Mounts.filter(m => m.Name != null).map(m => m.Name!),
|
||||
_.map(inspectInfo.NetworkSettings.Networks, n => n.NetworkID),
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user