remove 0 values

merge-requests/2/merge
Bsian 2020-01-01 16:13:51 +00:00
parent 54c7cb77f1
commit 4910ba62db
No known key found for this signature in database
GPG Key ID: 097FB9A291026091
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ export default class Parseall extends Command {
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]]);
}); });
const time = precise.map(((v) => v.join(''))).join(', '); const time = precise.filter((n) => n[0]).map(((v) => v.join(''))).join(', ');
if (notAfter < new Date()) final.push(`${this.client.stores.emojis.error} **${a.username}** Certificate expired ${time} ago`); if (notAfter < new Date()) final.push(`${this.client.stores.emojis.error} **${a.username}** Certificate expired ${time} ago`);
else final.push(`${this.client.stores.emojis.success} **${a.username}** Certificate expires in ${time}`); else final.push(`${this.client.stores.emojis.success} **${a.username}** Certificate expires in ${time}`);