Skip to content

Commit

Permalink
fix: fetch body fallback random number generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzlopak committed Jan 22, 2025
1 parent ee02abe commit fe53b97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/web/fetch/body.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ try {
const crypto = require('node:crypto')
random = (max) => crypto.randomInt(0, max)
} catch {
random = (max) => Math.floor(Math.random(max))
random = (max) => Math.floor(Math.random() * max)
}

const textEncoder = new TextEncoder()
Expand Down

0 comments on commit fe53b97

Please sign in to comment.