From 9f50b545b73dcf5558beb426b6229531d841ec58 Mon Sep 17 00:00:00 2001 From: svetlagasheva Date: Mon, 21 Oct 2019 15:40:01 +0300 Subject: [PATCH] spread syntax instead of concat.apply --- src/routes/Addons/useAddons.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/routes/Addons/useAddons.js b/src/routes/Addons/useAddons.js index 5a4bcd9d4..c678c8169 100644 --- a/src/routes/Addons/useAddons.js +++ b/src/routes/Addons/useAddons.js @@ -38,12 +38,11 @@ const useAddons = (category, type) => { const typeDropdown = () => { const selected = typeof type === 'string' && type.length > 0 ? [type] : []; const options = [...new Set( - [].concat.apply([], ['all'].concat( - state.ctx.content.addons.map(addon => addon.manifest.types), + ...state.ctx.content.addons.map(addon => addon.manifest.types), selected ) - ))] + )] .map((type) => ({ label: type, value: type })); return { 'data-name': 'type',