]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix bad date display for jobs
authorChocobozzz <me@florianbigard.com>
Tue, 25 Oct 2022 14:08:11 +0000 (16:08 +0200)
committerChocobozzz <me@florianbigard.com>
Tue, 25 Oct 2022 14:08:11 +0000 (16:08 +0200)
client/src/app/core/rest/rest-extractor.service.ts

index 57dd9ae26fcb54620aaeb90272bc5ea53d9008b3..de3f2bfff7f0cb64dd30d5db41ed7e45e4f73232 100644 (file)
@@ -37,6 +37,8 @@ export class RestExtractor {
 
   convertDateToHuman (target: any, fieldsToConvert: string[], format?: DateFormat) {
     fieldsToConvert.forEach(field => {
+      if (!target[field]) return
+
       target[field] = dateToHuman(this.localeId, new Date(target[field]), format)
     })