From 63a167dbccba1a63c777f3619a33b5ead3d907dd Mon Sep 17 00:00:00 2001 From: Arkerthan <arkerthan@gmail.com> Date: Tue, 18 Feb 2020 18:15:50 +0100 Subject: [PATCH] remove redundant else --- js/utils.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/js/utils.js b/js/utils.js index 8a259676675..f7abfb35bc2 100644 --- a/js/utils.js +++ b/js/utils.js @@ -163,11 +163,10 @@ function assembleList(items) { return "none"; } else if (items.length === 1) { return items[0]; - } else { - const last = items.pop(); - let r = items.join(", "); - return `${r} and ${last}`; } + const last = items.pop(); + let r = items.join(", "); + return `${r} and ${last}`; } /** -- GitLab