Skip to content

Commit

Permalink
fix: update playground SDK to increase the possible random numbers us…
Browse files Browse the repository at this point in the history
…ed 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
  • Loading branch information
thomasheartman authored Sep 19, 2024
1 parent 8e037a3 commit 15a98fc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 15a98fc

Please sign in to comment.