From c99ae42690acf6185e1bd03c1b5921d254e576e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Pe=CC=81ault?= Date: Sun, 29 Dec 2019 19:14:04 +0100 Subject: [PATCH] Last updated condition fix --- src/routes/location/[country]/[location].svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/location/[country]/[location].svelte b/src/routes/location/[country]/[location].svelte index eb6f0ef..0d687f9 100644 --- a/src/routes/location/[country]/[location].svelte +++ b/src/routes/location/[country]/[location].svelte @@ -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