Replace flat with reduce-concat

jh-changes
Shin'ya Ueoka 6 years ago
parent ccc6a31dde
commit 803e6ea7af
  1. 3
      src/background/shared/completions/index.js

@ -112,7 +112,8 @@ const getSetCompletions = (command, keywords) => {
url: 'Set ' + properties.docs[key], url: 'Set ' + properties.docs[key],
} }
]; ];
}).flat(); });
items = items.reduce((acc, val) => acc.concat(val), []);
if (items.length === 0) { if (items.length === 0) {
return Promise.resolve([]); return Promise.resolve([]);
} }