1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-04 00:18:01 +01:00

fix: update playground SDK to increase the possible random numbers used for stickiness id (#8182)

Same fix as done in some other sdks, such as the node one at
https://github.com/Unleash/unleash-client-node/pull/417o

Fixes an issue where 1% rollout would not yield any results with
random rollout for certain group ids
This commit is contained in:
Thomas Heartman 2024-09-19 10:34:04 +02:00 committed by GitHub
parent 8e037a335f
commit 15a98fcaf4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -10,7 +10,7 @@ const STICKINESS = {
export default class FlexibleRolloutStrategy extends Strategy {
private randomGenerator: Function = () =>
`${Math.round(Math.random() * 100) + 1}`;
`${Math.round(Math.random() * 10_000) + 1}`;
constructor(radnomGenerator?: Function) {
super('flexibleRollout');