From f51c78bbfa1acd3c2c3d10ec8db8f586b3347c84 Mon Sep 17 00:00:00 2001 From: Xuan Son Nguyen Date: Thu, 7 Nov 2024 07:22:09 -0400 Subject: [PATCH] small fix --- examples/server/public/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/server/public/index.html b/examples/server/public/index.html index 268956abf..6dcdd9c55 100644 --- a/examples/server/public/index.html +++ b/examples/server/public/index.html @@ -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; }