1
0
Fork 0

Should fix certificate status not showing

refactor/models
Bsian 2020-01-01 15:10:12 +00:00
parent e21140ce58
commit 5bb02c85f0
No known key found for this signature in database
GPG Key ID: 097FB9A291026091
1 changed files with 2 additions and 1 deletions

View File

@ -35,7 +35,8 @@ export default class Parseall extends Command {
const timeObject: {years: number, months: number, days: number, hours: number, minutes: number, seconds: number, firstDateWasLater: boolean} = moment.preciseDiff(new Date(), notAfter, true); const timeObject: {years: number, months: number, days: number, hours: number, minutes: number, seconds: number, firstDateWasLater: boolean} = moment.preciseDiff(new Date(), notAfter, true);
const precise: [number, string][] = []; const precise: [number, string][] = [];
// @ts-ignore // @ts-ignore
const timeArray: number[] = Object.values(timeObject).filter((v) => !isNaN(v)).forEach((t: number) => { // eslint-disable-line const timeArray: number[] = Object.values(timeObject).filter((v) => typeof v === 'number');
timeArray.forEach((t) => { // eslint-disable-line
const index = timeArray.indexOf(t); const index = timeArray.indexOf(t);
const measurements = ['yr', 'mo', 'd', 'h', 'm', 's']; const measurements = ['yr', 'mo', 'd', 'h', 'm', 's'];
precise.push([t, measurements[index]]); precise.push([t, measurements[index]]);