Skip to content

Commit 5eeab66

Browse files
committed
changes after comments
1 parent 782a5e7 commit 5eeab66

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ module.exports = {
8787
bucketerParams.logger.log(LOG_LEVEL.DEBUG, bucketedUserLogMessage);
8888

8989
var entityId = module.exports._findBucket(bucketValue, bucketerParams.trafficAllocationConfig);
90-
if (entityId === null || entityId === '') {
90+
if (!entityId) {
9191
var userHasNoVariationLogMessage = sprintf(LOG_MESSAGES.USER_HAS_NO_VARIATION, MODULE_NAME, bucketerParams.userId, bucketerParams.experimentKey);
9292
bucketerParams.logger.log(LOG_LEVEL.DEBUG, userHasNoVariationLogMessage);
9393
} else if (!bucketerParams.variationIdMap.hasOwnProperty(entityId)) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ DecisionService.prototype._getVariationForFeatureExperiment = function(configObj
349349

350350
DecisionService.prototype._getExperimentInGroup = function(configObj, group, userId) {
351351
var experimentId = bucketer.bucketUserIntoExperiment(group, userId, userId, this.logger);
352-
if (experimentId !== null && experimentId !== '') {
352+
if (experimentId) {
353353
this.logger.log(LOG_LEVEL.INFO, sprintf(LOG_MESSAGES.USER_BUCKETED_INTO_EXPERIMENT_IN_GROUP, MODULE_NAME, userId, experimentId, group.id));
354354
var experiment = projectConfig.getExperimentFromId(configObj, experimentId, this.logger);
355355
if (experiment) {

0 commit comments

Comments
 (0)