diff --git a/client/app/scripts/components/node-details/node-details-image-status.js b/client/app/scripts/components/node-details/node-details-image-status.js index 44c00fb82..23c95375c 100644 --- a/client/app/scripts/components/node-details/node-details-image-status.js +++ b/client/app/scripts/components/node-details/node-details-image-status.js @@ -10,13 +10,17 @@ import { getImagesForService } from '../../actions/app-actions'; const topologyWhitelist = ['kube-controllers']; function newImagesAvailable(images, currentId) { - // Assume that the current image is always in the list of all available images. - // Should be a safe assumption... const current = find(images, i => i.ID === currentId); - const timestamp = new Date(current.CreatedAt); - return !isNull(find(images, i => timestamp < new Date(i.CreatedAt))); + + if (current) { + const timestamp = new Date(current.CreatedAt); + return !isNull(find(images, i => timestamp < new Date(i.CreatedAt))); + } + + return false; } + class NodeDetailsImageStatus extends React.PureComponent { constructor(props, context) { super(props, context);