Fixed EncryptionTopline check

This commit is contained in:
Ildar Kamalov 2019-02-21 15:39:15 +03:00
parent 5ac775aa4a
commit 37a1a98c49

View File

@ -8,7 +8,10 @@ import Topline from './Topline';
import { EMPTY_DATE } from '../../helpers/constants'; import { EMPTY_DATE } from '../../helpers/constants';
const EncryptionTopline = (props) => { const EncryptionTopline = (props) => {
if (props.notAfter !== EMPTY_DATE) { if (props.notAfter === EMPTY_DATE) {
return false;
}
const isAboutExpire = isAfter(addDays(Date.now(), 30), props.notAfter); const isAboutExpire = isAfter(addDays(Date.now(), 30), props.notAfter);
const isExpired = isAfter(Date.now(), props.notAfter); const isExpired = isAfter(Date.now(), props.notAfter);
@ -29,7 +32,6 @@ const EncryptionTopline = (props) => {
</Topline> </Topline>
); );
} }
}
return false; return false;
}; };