cleaner undefined check
This commit is contained in:
2
index.js
2
index.js
@@ -120,7 +120,7 @@ Searxng.prototype.handleMessage = function(event, room) {
|
||||
|
||||
const messagePieces = event.getContent().body.split(" ");
|
||||
|
||||
if (messagePieces[0] != undefined && searxngCommands.indexOf(messagePieces[0].toLowerCase()) > -1) {
|
||||
if (searxngCommands.indexOf(messagePieces[0]?.toLowerCase()) > -1) {
|
||||
|
||||
var cooldown = false;
|
||||
|
||||
|
Reference in New Issue
Block a user