From ec5d2a8ce093b14dee2b380394d50750b17379a5 Mon Sep 17 00:00:00 2001 From: 1computer1 Date: Tue, 12 Mar 2019 12:53:17 -0400 Subject: [PATCH] Fix empty invalid options --- src/listeners/messageInvalid.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/listeners/messageInvalid.js b/src/listeners/messageInvalid.js index dfaedc2..cb830f5 100644 --- a/src/listeners/messageInvalid.js +++ b/src/listeners/messageInvalid.js @@ -72,6 +72,10 @@ class MessageInvalidListener extends Listener { const valid = new Map(); const invalid = []; for (const [key, value] of kvs) { + if (!key) { + continue; + } + const ok = Object.prototype.hasOwnProperty.call(language.options, key) && language.options[key](value); if (ok) { valid.set(key, value);