1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 07:49:41 +02:00

prevent exception when showing stats on windows container (#5890)

Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io>
This commit is contained in:
Sven Dowideit 2021-10-18 13:36:22 +10:00 committed by GitHub
parent 3cde10bcac
commit 5eced421d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -100,7 +100,7 @@ export function ContainerStatsViewModel(data) {
}
}
this.Networks = _.values(data.networks);
if (data.blkio_stats !== undefined) {
if (data.blkio_stats !== undefined && data.blkio_stats.io_service_bytes_recursive !== null) {
//TODO: take care of multiple block devices
var readData = data.blkio_stats.io_service_bytes_recursive.find((d) => d.op === 'Read');
if (readData === undefined) {