repositories
/
e-mobility-charging-stations-simulator.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
58a9807
)
Fix random integer generator
author
Jérôme Benoit
<jerome.benoit@sap.com>
Mon, 24 Oct 2022 13:31:05 +0000
(15:31 +0200)
committer
Jérôme Benoit
<jerome.benoit@sap.com>
Mon, 24 Oct 2022 13:31:05 +0000
(15:31 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/utils/Utils.ts
patch
|
blob
|
blame
|
history
diff --git
a/src/utils/Utils.ts
b/src/utils/Utils.ts
index 18d56497507b55abfaf4bef9c8fb4759f8b78b31..e8e658d1c07ec57522a37e718822e54a08da4af2 100644
(file)
--- 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');
}