From efdc798c1c9522a48d4ffe4a5f1de63427324e94 Mon Sep 17 00:00:00 2001 From: pythongosssss <125205205+pythongosssss@users.noreply.github.com> Date: Sat, 15 Apr 2023 11:13:19 +0100 Subject: [PATCH] Add support for number[dot]number in the validation regex --- src/litegraph.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/litegraph.js b/src/litegraph.js index a51b14463..7375a8243 100755 --- a/src/litegraph.js +++ b/src/litegraph.js @@ -10034,7 +10034,7 @@ LGraphNode.prototype.executeAction = function(action) if (event.click_time < 200 && delta == 0) { this.prompt("Value",w.value,function(v) { // check if v is a valid equation or a number - if (/^[0-9+\-*/()\s]+$/.test(v)) { + if (/^[0-9+\-*/()\s]+|\d+\.\d+$/.test(v)) { try {//solve the equation if possible v = eval(v); } catch (e) { }