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

Allow nbRateUnits to be undefined when validating

Fixes #3407
This commit is contained in:
Nick O'Leary 2022-02-14 20:44:55 +00:00
parent 264047dc0c
commit be11fda814
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -115,7 +115,7 @@
timeoutUnits: {value:"seconds"},
rate: {value:"1", required:true, validate:function(v) { return RED.validators.number(v) && (v >= 0); }},
nbRateUnits: {value:"1", required:false,
validate:function(v) { return RED.validators.number(v) && (v >= 0); }},
validate:function(v) { return v === undefined || (RED.validators.number(v) && (v >= 0)); }},
rateUnits: {value: "second"},
randomFirst: {value:"1", required:true, validate:function(v) { return RED.validators.number(v) && (v >= 0); }},
randomLast: {value:"5", required:true, validate:function(v) { return RED.validators.number(v) && (v >= 0); }},