Fix empty invalid options

This commit is contained in:
1computer1 2019-03-12 12:53:17 -04:00
parent 5483c509c0
commit ec5d2a8ce0

View file

@ -72,6 +72,10 @@ class MessageInvalidListener extends Listener {
const valid = new Map(); const valid = new Map();
const invalid = []; const invalid = [];
for (const [key, value] of kvs) { for (const [key, value] of kvs) {
if (!key) {
continue;
}
const ok = Object.prototype.hasOwnProperty.call(language.options, key) && language.options[key](value); const ok = Object.prototype.hasOwnProperty.call(language.options, key) && language.options[key](value);
if (ok) { if (ok) {
valid.set(key, value); valid.set(key, value);