small fix

This commit is contained in:
Xuan Son Nguyen 2024-11-07 07:22:09 -04:00
parent f2268fad81
commit f51c78bbfa

View file

@ -529,8 +529,9 @@
alert('Invalid JSON for custom config. Please either fix it or leave it empty.');
return;
}
console.log(this.config)
for (const key of CONFIG_NUMERIC_KEYS) {
if (!isNaN(this.config[key]) && this.config[key].trim().length > 0) {
if (isNaN(this.config[key]) || this.config[key].toString().trim().length === 0) {
alert(`Invalid number for ${key} (expected an integer or a float)`);
return;
}