Last updated condition fix

This commit is contained in:
2019-12-29 19:14:04 +01:00
parent 706ce19f35
commit c99ae42690

View File

@@ -43,7 +43,7 @@
full: dayjs(photos[0].modified_on).format('MMM Do, YYYY'),
relative: dayjs().to(dayjs(photos[0].modified_on))
} : undefined
const lastUpdated = (photos.length) ? (dayjs(photos[0].modified_on).isBefore(dayjs().subtract(1, 'M'))) ? dateUpdated.full : dateUpdated.relative : undefined
const lastUpdated = (photos.length) ? ((dayjs(photos[0].modified_on).isBefore(dayjs().subtract(1, 'M'))) ? dateUpdated.full : dateUpdated.relative) : undefined
</script>
<svelte:head>