Skip to content

Commit

Permalink
fix: Ne pas réassigner si l'A/B-test est déjà tiré
Browse files Browse the repository at this point in the history
  • Loading branch information
baptou12 committed Sep 14, 2023
1 parent 5eb4145 commit fb953a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plugins/ab-testing-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ function getEnvironment() {

const versions = ["version_actuelle", "version_test_1", "version_test_2"]
const ctaEmailRecontact = ABTestingEnvironment.CTA_EmailRecontact || {}
ctaEmailRecontact.index = 5
ctaEmailRecontact.value =
ctaEmailRecontact.index ||= 5
ctaEmailRecontact.value ||=
versions[Math.floor(Math.random() * versions.length)]
ABTestingEnvironment.CTA_EmailRecontact = ctaEmailRecontact

Expand Down

0 comments on commit fb953a6

Please sign in to comment.