Fix handling of non-positive expiry times in punishment history

This commit is contained in:
Teriuihi 2025-04-18 18:46:14 +02:00
parent 87a0b9ad1b
commit 53f67a5075

View File

@ -79,7 +79,7 @@ export class HistoryComponent implements OnInit, OnChanges {
} }
public getExpiredTime(entry: PunishmentHistoryInner) { public getExpiredTime(entry: PunishmentHistoryInner) {
if (entry.expiryTime === 0) { if (entry.expiryTime <= 0) {
return "Permanent " + this.getType(entry); return "Permanent " + this.getType(entry);
} }
const date = new Date(entry.expiryTime); const date = new Date(entry.expiryTime);