repositories
/
benchmarks-js.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix random integer generator
[benchmarks-js.git]
/
benchmark-utils.js
diff --git
a/benchmark-utils.js
b/benchmark-utils.js
index 164cfc6596184017b0735cd98833a16d376f039c..50aa39ce19f25d5cc2639c3d541dd914f63b66c7 100644
(file)
--- a/
benchmark-utils.js
+++ b/
benchmark-utils.js
@@
-19,7
+19,7
@@
function generateRandomInteger (max = Number.MAX_SAFE_INTEGER, min = 0) {
throw new RangeError('Invalid interval')
}
max = Math.floor(max)
- if (min) {
+ if (min
!= null && min !== 0
) {
if (max < min || min < 0) {
throw new RangeError('Invalid interval')
}