mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 02:00:43 +00:00
Merge pull request #2934 from weaveworks/1449-image-details-undefined
Fix undefined image bug
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user