Browse Source

skip printing date if it is missing

master
Jørgen Lien Sellæg 6 years ago
parent
commit
aa7fa894fd
  1. 7
      src/Events.js

7
src/Events.js

@ -35,7 +35,12 @@ function Time({ date }) {
hour: time_option,
minute: time_option,
}
return <h4>{new Intl.DateTimeFormat('no', options).format(date)}</h4>
let res = null
try {
res = new Intl.DateTimeFormat('no', options).format(date)
} catch (error) {}
return <h4>{res}</h4>
}
function Location({ location }) {

Loading…
Cancel
Save