commit 79c50d17e7527cf7a89c7fe279c9802e2d276bc2
parent f9b691e67925539420c16f3cc4fc4d8aec7d4d57
Author: Demonstrandum <moi@knutsen.co>
Date: Thu, 19 Mar 2020 01:27:17 +0000
Sparse arrays are a thing...
Diffstat:
5 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib/main.ts b/lib/main.ts
@@ -528,11 +528,13 @@ export class SimpOMatic {
const { content } = message;
if (!content) return; // Message with no content (deleted)...
for (const responder of CONFIG.rules.respond) {
+ if (!responder) continue; // Sparse arrays!
const match = content.match(responder.match);
const { response } = responder;
if (match && response) message.answer(response);
}
for (const rejecter of CONFIG.rules.reject) {
+ if (!rejecter) continue; // Sparse arrays!
const match = content.match(rejecter.match);
const { response } = rejecter;
if (match) {
diff --git a/out.png b/out.png
Binary files differ.
diff --git a/u1.png b/u1.png
Binary files differ.
diff --git a/u2.png b/u2.png
Binary files differ.
diff --git a/❤️.png b/❤️.png
Binary files differ.