Skip to content

Commit b68991a

Browse files
use ternary operator and truthiness casting
1 parent ee47067 commit b68991a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sync/polling/updaters/splitChangesUpdater.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export function parseSegments(ruleEntity: ISplit | IRBSegment, matcherType: type
3333
const { conditions = [], excluded } = ruleEntity as IRBSegment;
3434

3535
const segments = new Set<string>(
36-
excluded?.segments?.map(segment => segment.name) || []
36+
excluded && excluded.segments ? excluded.segments.map(segment => segment.name) : []
3737
);
3838

3939
for (let i = 0; i < conditions.length; i++) {

0 commit comments

Comments
 (0)