Skip to content

Commit

Permalink
fix bug with non-tuple range
Browse files Browse the repository at this point in the history
  • Loading branch information
tol-is committed Dec 15, 2022
1 parent f549e2d commit 07ad7fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"randomizer",
"yugop"
],
"version": "2.2.3",
"version": "2.2.4",
"license": "MIT",
"module": "dist/use-scramble.esm.js",
"main": "dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function getRandomChar(range: RangeOrCharCodes) {
if (range.length === 2) {
rand = getRandomInt(range[0], range[1] + 1);
} else {
rand = range[getRandomInt(0, range.length - 1)];
rand = range[getRandomInt(0, range.length)];
}

return String.fromCharCode(rand);
Expand Down

0 comments on commit 07ad7fc

Please sign in to comment.