Skip to content

Commit b00d120

Browse files
committed
Merge after 3.3.8 release
2 parents cdc3edc + 3044cd5 commit b00d120

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

.github/workflows/test.yml

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ on:
33
push:
44
branches:
55
- main
6+
- v3
67
pull_request:
78
permissions:
89
contents: read

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
4242
* Removed Node.js 10 and Node.js 12 support.
4343
* Reduced npm package size.
4444

45+
## 3.3.8
46+
* Fixed a way to brake Nano ID by passing non-integer size (by @myndzi).
47+
4548
## 3.3.7
4649
* Fixed `node16` TypeScript support (by Saadi Myftija).
4750

index.browser.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export let customRandom = (alphabet, defaultSize, getRandom) => {
3636
while (true) {
3737
let bytes = getRandom(step)
3838
// A compact alternative for `for (var i = 0; i < step; i++)`.
39-
let j = step
39+
let j = step | 0
4040
while (j--) {
4141
// Adding `|| ''` refuses a random byte that exceeds the alphabet size.
4242
id += alphabet[bytes[j] & mask] || ''

0 commit comments

Comments
 (0)