Skip to content

Commit 9880fb2

Browse files
committed
fix: ensure opportunities are set to null if empty
1 parent a4790a0 commit 9880fb2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/cio.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export const identifyUserOpportunities = async ({
170170
});
171171
const ids = opportunities.map((opportunity) => opportunity.opportunityId);
172172
await cio.identify(userId, {
173-
opportunities: ids || null,
173+
opportunities: ids?.length > 0 ? ids : null,
174174
});
175175
};
176176

0 commit comments

Comments
 (0)