From ef99e672c9957d608126d43a1864a75ec99ffca5 Mon Sep 17 00:00:00 2001 From: Simon Howe Date: Mon, 20 Nov 2017 14:37:33 +0100 Subject: [PATCH] Correctly show whether there are new images or not. find returns 'undefined' not 'null'! --- .../components/node-details/node-details-image-status.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 23c95375c..2b46dbed6 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 @@ -2,7 +2,6 @@ import React from 'react'; import { connect } from 'react-redux'; import find from 'lodash/find'; import map from 'lodash/map'; -import isNull from 'lodash/isNull'; import { CircularProgress } from 'weaveworks-ui-components'; import { getImagesForService } from '../../actions/app-actions'; @@ -14,7 +13,7 @@ function newImagesAvailable(images, currentId) { if (current) { const timestamp = new Date(current.CreatedAt); - return !isNull(find(images, i => timestamp < new Date(i.CreatedAt))); + return Boolean(find(images, i => new Date(i.CreatedAt) > timestamp)); } return false;