misc.search: Array.from sucks

This commit is contained in:
Cynthia Foxwell 2024-04-04 14:38:02 -06:00
parent 73658b5be1
commit 942de91a68

View file

@ -574,7 +574,7 @@ search.callback = async function (msg, line, args, {results = 2}) {
(res) => res.json()
);
delete res.results_source;
const searchResults = Array.from(res)
const searchResults = Object.values(res)
.filter((result) => !("did_you_mean" in result))
.splice(0, Number(results));