misc.search: catch empty queries

This commit is contained in:
Cynthia Foxwell 2023-01-17 17:31:49 -07:00
parent 97cb96d93c
commit bf83368762

View file

@ -554,6 +554,7 @@ search.addAlias("google");
search.addAlias("ddg");
search.callback = async function (msg, line) {
if (!librex) return "LibreX instance not defined.";
if (!line || line == "") return "Search query required.";
const query = encodeURIComponent(line);