From b61e38d711c5e11d6cbcc55992788b2b8b77df29 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Tue, 23 Mar 2021 11:49:29 +0100 Subject: [PATCH] spam quarantine: shorter mapping from selected to id list Signed-off-by: Thomas Lamprecht --- js/SpamQuarantine.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/js/SpamQuarantine.js b/js/SpamQuarantine.js index f5875bc..9a84649 100644 --- a/js/SpamQuarantine.js +++ b/js/SpamQuarantine.js @@ -118,10 +118,7 @@ Ext.define('PMG.SpamQuarantine', { var list = this.lookupReference('list'); if (selected.length > 1) { - var idlist = []; - selected.forEach(function(item) { - idlist.push(item.data.id); - }); + let idlist = selected.map(item => item.data.id); Ext.Msg.confirm( gettext('Confirm'), Ext.String.format(