From aa7fa894fd8529d60c1bea8324ef2a7ed5e8fd61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Sverre=20Lien=20Sell=C3=A6g?= Date: Thu, 11 Jun 2020 16:38:51 +0200 Subject: [PATCH] skip printing date if it is missing --- src/Events.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Events.js b/src/Events.js index 3d80136..c76d27b 100644 --- a/src/Events.js +++ b/src/Events.js @@ -35,7 +35,12 @@ function Time({ date }) { hour: time_option, minute: time_option, } - return

{new Intl.DateTimeFormat('no', options).format(date)}

+ let res = null + try { + res = new Intl.DateTimeFormat('no', options).format(date) + } catch (error) {} + + return

{res}

} function Location({ location }) {