misc.search: catch empty queries
This commit is contained in:
parent
97cb96d93c
commit
bf83368762
1 changed files with 1 additions and 0 deletions
|
@ -554,6 +554,7 @@ search.addAlias("google");
|
||||||
search.addAlias("ddg");
|
search.addAlias("ddg");
|
||||||
search.callback = async function (msg, line) {
|
search.callback = async function (msg, line) {
|
||||||
if (!librex) return "LibreX instance not defined.";
|
if (!librex) return "LibreX instance not defined.";
|
||||||
|
if (!line || line == "") return "Search query required.";
|
||||||
|
|
||||||
const query = encodeURIComponent(line);
|
const query = encodeURIComponent(line);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue