Skip to content

Commit 046db6c

Browse files
committed
Adds getBucketingId call in getVariationForRollout method.
1 parent 599858b commit 046db6c

File tree

1 file changed

+3
-1
lines changed
  • packages/optimizely-sdk/lib/core/decision_service

1 file changed

+3
-1
lines changed

packages/optimizely-sdk/lib/core/decision_service/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,8 @@ DecisionService.prototype._getVariationForRollout = function(feature, userId, at
384384
};
385385
}
386386

387+
var bucketingId = this._getBucketingId(userId, attributes);
388+
387389
// The end index is length - 1 because the last experiment is assumed to be
388390
// "everyone else", which will be evaluated separately outside this loop
389391
var endIndex = rollout.experiments.length - 1;
@@ -401,7 +403,7 @@ DecisionService.prototype._getVariationForRollout = function(feature, userId, at
401403
}
402404

403405
this.logger.log(LOG_LEVEL.DEBUG, sprintf(LOG_MESSAGES.USER_MEETS_CONDITIONS_FOR_TARGETING_RULE, MODULE_NAME, userId, index + 1));
404-
bucketerParams = this.__buildBucketerParams(experiment.key, userId, userId);
406+
bucketerParams = this.__buildBucketerParams(experiment.key, bucketingId, userId);
405407
variationId = bucketer.bucket(bucketerParams);
406408
variation = this.configObj.variationIdMap[variationId];
407409
if (variation) {

0 commit comments

Comments
 (0)