fix: handle null ports in Docker container table (#5313)
When Docker API returns `null` for container ports (instead of `[]`), the Docker management page crashes. Added optional chaining on `ports?.length` to handle this case. Fixes #5311 Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
This commit is contained in:
1 parent
d53c922688
commit
1639da5779
4 files changed
+5
-3
No files matched your search
@@ -140,7 +140,7 @@ interface DockerContainer {
|
||||
id: string;
|
||||
state: ContainerState;
|
||||
image: string;
|
||||
ports: Port[];
|
||||
ports: Port[] | undefined;
|
||||
iconUrl: string | null;
|
||||
cpuUsage: number;
|
||||
memoryUsage: number;
|
||||
|
||||
Reference in new issue
Block a user