From 53440aadc8ee00ae7b705d880cd6e65f3c9af0a6 Mon Sep 17 00:00:00 2001 From: Szymon Nowicki Date: Wed, 10 Apr 2024 19:03:14 +0200 Subject: [PATCH] fix: abstain if no query provided --- server/lib/ban/isBanned.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/lib/ban/isBanned.js b/server/lib/ban/isBanned.js index 9d378aa..19cf946 100644 --- a/server/lib/ban/isBanned.js +++ b/server/lib/ban/isBanned.js @@ -2,6 +2,10 @@ import shortener from './shortener.js'; import phrases from './phrases.js'; export const isBanned = (query) => { + if (!query) { + return false; + } + // Check for shorteners if (shortener.includes(query)) { return true;