Replace flat with reduce-concat

This commit is contained in:
Shin'ya Ueoka 2018-07-13 22:14:19 +09:00
parent ccc6a31dde
commit 803e6ea7af

View file

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