From 220f91fdc5c8d438af7994b8896650c6297cd926 Mon Sep 17 00:00:00 2001 From: Elizabeth Danzberger Date: Fri, 19 Jan 2024 13:38:09 -0500 Subject: [PATCH] fixed to follow nextcloud coding guidelines Signed-off-by: Elizabeth Danzberger --- src/components/overview/Overview.vue | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/components/overview/Overview.vue b/src/components/overview/Overview.vue index dff7d92fd..e5d84e587 100644 --- a/src/components/overview/Overview.vue +++ b/src/components/overview/Overview.vue @@ -145,14 +145,16 @@ export default { sortCards(when) { const cards = this.assignedCardsDashboard[when] - if (!cards) return null + if (!cards) { + return null + } else { + return cards.toSorted((current, next) => { + const currentDueDate = new Date(current.duedate) + const nextDueDate = new Date(next.duedate) - return cards.toSorted((current, next) => { - const currentDueDate = new Date(current.duedate) - const nextDueDate = new Date(next.duedate) - - return currentDueDate - nextDueDate - }) + return currentDueDate - nextDueDate + }) + } }, },