From 1f86b121076f7bed00f42e3f58c9f09166eda7ff Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 24 Oct 2022 15:31:05 +0200 Subject: [PATCH] Fix random integer generator MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/utils/Utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/Utils.ts b/src/utils/Utils.ts index 18d56497..e8e658d1 100644 --- a/src/utils/Utils.ts +++ b/src/utils/Utils.ts @@ -119,7 +119,7 @@ export default class Utils { throw new RangeError('Invalid interval'); } max = Math.floor(max); - if (min) { + if (!Utils.isNullOrUndefined(min) && min !== 0) { if (max < min || min < 0) { throw new RangeError('Invalid interval'); } -- 2.34.1