Skip to content

Commit a09901a

Browse files
authored
de-lint topics-api.ts
1 parent e23f765 commit a09901a

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

lib/addons/topics-api.ts

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,19 @@ OptableSDK.prototype.ingestTopics = function () {
7171
return;
7272
}
7373

74-
const traits = topics.reduce((acc, topic) => {
75-
const traitKey = `topics_v${topic.taxonomyVersion}`;
76-
if (acc[traitKey]) {
77-
acc[traitKey] += ",";
78-
} else {
79-
acc[traitKey] = "";
80-
}
81-
acc[traitKey] += String(topic.topic);
82-
return acc;
83-
}, {} as Record<string, string>);
74+
const traits = topics.reduce(
75+
(acc, topic) => {
76+
const traitKey = `topics_v${topic.taxonomyVersion}`;
77+
if (acc[traitKey]) {
78+
acc[traitKey] += ",";
79+
} else {
80+
acc[traitKey] = "";
81+
}
82+
acc[traitKey] += String(topic.topic);
83+
return acc;
84+
},
85+
{} as Record<string, string>
86+
);
8487

8588
this.profile(traits);
8689
})

0 commit comments

Comments
 (0)