1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Merge pull request #3880 from kazuhitoyokoi/master-replacedot4function

Remove dot from variable name for external module in function node
This commit is contained in:
Nick O'Leary 2022-09-12 19:25:39 +01:00 committed by GitHub
commit 22b6564847
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -294,7 +294,7 @@
if (val === "_custom_") {
val = $(this).val();
}
var varName = val.trim().replace(/^@/,"").replace(/@.*$/,"").replace(/[-_/].?/g, function(v) { return v[1]?v[1].toUpperCase():"" });
var varName = val.trim().replace(/^@/,"").replace(/@.*$/,"").replace(/[-_/\.].?/g, function(v) { return v[1]?v[1].toUpperCase():"" });
fvar.val(varName);
fvar.trigger("change");