Skip to content

Commit

Permalink
fixed nanoid issue
Browse files Browse the repository at this point in the history
  • Loading branch information
cullophid committed Jul 4, 2024
1 parent 1643fec commit cbc3e92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,6 @@ function generateId(size = 21): string {
const chars =
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-';
return new Array(size).fill(0)
.map(() => chars[Math.round(Math.random() % chars.length)])
.map(() => chars[Math.round(Math.random() * chars.length)])
.join('');
}

0 comments on commit cbc3e92

Please sign in to comment.