diff options
| author | OleksandrYehorov <[email protected]> | 2021-03-19 13:04:00 +0200 |
|---|---|---|
| committer | OleksandrYehorov <[email protected]> | 2021-03-19 13:04:00 +0200 |
| commit | 6d2902caf2df81fb14836b2cb4e1dbcdb72557ba (patch) | |
| tree | 60ad08e34465ce0e90e1b6415140f8f42a820289 /lib/random.js | |
| parent | 4d0ed4ad64452f01c7ca6c4c3b5c17c302ec1422 (diff) | |
| download | faker-6d2902caf2df81fb14836b2cb4e1dbcdb72557ba.tar.xz faker-6d2902caf2df81fb14836b2cb4e1dbcdb72557ba.zip | |
Fix index generation
Diffstat (limited to 'lib/random.js')
| -rw-r--r-- | lib/random.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/random.js b/lib/random.js index 207d6c50..adc9537b 100644 --- a/lib/random.js +++ b/lib/random.js @@ -89,7 +89,7 @@ function Random (faker, seed) { var index; while (i-- > min) { - index = Math.floor((i + 1) * faker.datatype.float({ min: 0, max: 1 })); + index = Math.floor((i + 1) * faker.datatype.float({ min: 0, max: 0.99 })); temp = arrayCopy[index]; arrayCopy[index] = arrayCopy[i]; arrayCopy[i] = temp; |
