Skip to content

Commit ed36526

Browse files
authored
backports targeting bug (#18)
1 parent f8d2212 commit ed36526

File tree

1 file changed

+5
-1
lines changed
  • packages/react-native/src/lib/common

1 file changed

+5
-1
lines changed

packages/react-native/src/lib/common/utils.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,11 @@ export const filterSurveys = (
111111
});
112112

113113
if (!userId) {
114-
return filteredSurveys;
114+
// exclude surveys that have a segment with filters
115+
return filteredSurveys.filter((survey) => {
116+
const segmentFiltersLength = survey.segment?.filters?.length ?? 0;
117+
return segmentFiltersLength === 0;
118+
});
115119
}
116120

117121
if (!segments.length) {

0 commit comments

Comments
 (0)