Skip to content

Commit

Permalink
fix: abstain if no query provided
Browse files Browse the repository at this point in the history
  • Loading branch information
sznowicki committed Apr 10, 2024
1 parent eac443e commit 53440aa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/lib/ban/isBanned.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 53440aa

Please sign in to comment.