From e4fc3c08dc98a280a535382a1e2b8db8558b0697 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Sat, 3 Nov 2018 04:41:17 +0100 Subject: [PATCH] [fix] empty date return empty string --- templates/index.html | 2 ++ templates/job.html | 2 ++ 2 files changed, 4 insertions(+) diff --git a/templates/index.html b/templates/index.html index 32e05ea..66fe666 100644 --- a/templates/index.html +++ b/templates/index.html @@ -36,6 +36,8 @@ }, methods: { timestampToDate: function (timestamp) { + if (timestamp === null) return ""; + return new Date(timestamp * 1000).toLocaleString() } } diff --git a/templates/job.html b/templates/job.html index 0d2e021..6ba98a2 100644 --- a/templates/job.html +++ b/templates/job.html @@ -38,6 +38,8 @@ }, methods: { timestampToDate: function (timestamp) { + if (timestamp === null) return ""; + return new Date(timestamp * 1000).toLocaleString() }, cancelJob: function() {