From c28ed83bdaf877ce9eaf6af62fa436ebacef28b8 Mon Sep 17 00:00:00 2001 From: Nuno Caseiro <90208434+nunocaseiro@users.noreply.github.com> Date: Sat, 5 Mar 2022 15:35:39 +0000 Subject: [PATCH] refactor: pr review suggestion applied Co-authored-by: Rui Silva --- backend/src/modules/cards/services/unmerge.card.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/modules/cards/services/unmerge.card.service.ts b/backend/src/modules/cards/services/unmerge.card.service.ts index f64dcfdce..d3365c206 100644 --- a/backend/src/modules/cards/services/unmerge.card.service.ts +++ b/backend/src/modules/cards/services/unmerge.card.service.ts @@ -55,7 +55,7 @@ export class UnmergeCardServiceImpl implements UnmergeCardService { (item) => item._id.toString() !== draggedCardId, ); if (items.length === 1) { - const { text, comments, votes: itemVotes } = items[0]; + const [{ text, comments, votes: itemVotes }] = items; const newComments = cardGroup.comments.concat(comments); const newVotes = (cardGroup.votes as unknown as string[]).concat( itemVotes as unknown as string[],