diff --git a/nodes/core/core/89-delay.js b/nodes/core/core/89-delay.js index dfc5616ae..3a299caeb 100644 --- a/nodes/core/core/89-delay.js +++ b/nodes/core/core/89-delay.js @@ -62,8 +62,8 @@ module.exports = function(RED) { } if (n.randomUnits === "milliseconds") { - this.randomFirst = n.randomFirst; - this.randomLast = n.randomLast; + this.randomFirst = n.randomFirst * 1; + this.randomLast = n.randomLast * 1; } else if (n.randomUnits === "seconds") { this.randomFirst = n.randomFirst * 1000; this.randomLast = n.randomLast * 1000; diff --git a/test/nodes/core/core/89-delay_spec.js b/test/nodes/core/core/89-delay_spec.js index 22c3173a5..87ca6088f 100644 --- a/test/nodes/core/core/89-delay_spec.js +++ b/test/nodes/core/core/89-delay_spec.js @@ -368,7 +368,7 @@ describe('delayNode', function() { }); it(' randomly delays the message in milliseconds', function(done) { - randomDelayTest(400, 800, "milliseconds", done); + randomDelayTest("400", "800", "milliseconds", done); }); it('randomly delays the message in minutes', function(done) {