Skip to content

Commit 59a87eb

Browse files
committed
attributeIds update
1 parent d8b4f19 commit 59a87eb

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

lib/project_config/project_config.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -249,12 +249,12 @@ describe('createProjectConfig - cmab experiments', () => {
249249
it('should populate cmab field correctly', function() {
250250
const datafile = testDatafile.getTestProjectConfig();
251251
datafile.experiments[0].cmab = {
252-
attributes: ['808797688', '808797689'],
252+
attributeIds: ['808797688', '808797689'],
253253
trafficAllocation: 3141,
254254
};
255255

256256
datafile.experiments[2].cmab = {
257-
attributes: ['808797689'],
257+
attributeIds: ['808797689'],
258258
trafficAllocation: 1414,
259259
};
260260

lib/project_config/project_config.ts

-9
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,6 @@ export const createProjectConfig = function(datafileObj?: JSON, datafileStr: str
157157

158158
projectConfig.__datafileStr = datafileStr === null ? JSON.stringify(datafileObj) : datafileStr;
159159

160-
/** rename cmab.attributes field from the datafile to cmab.attributeIds for each experiment */
161-
projectConfig.experiments.forEach(experiment => {
162-
if (experiment.cmab) {
163-
const attributes = (experiment.cmab as any).attributes;
164-
delete (experiment.cmab as any).attributes;
165-
experiment.cmab.attributeIds = attributes;
166-
}
167-
});
168-
169160
/*
170161
* Conditions of audiences in projectConfig.typedAudiences are not
171162
* expected to be string-encoded as they are here in projectConfig.audiences.

0 commit comments

Comments
 (0)