@@ -109,7 +109,7 @@ export const withinMaxViews = (log: EpicViewLog, now: Date = new Date()): Filter
109109
110110 const testId = test . useLocalViewLog ? test . name : undefined ;
111111
112- return ! shouldThrottle ( log , test . maxViews || defaultMaxViews , testId , now ) ;
112+ return ! shouldThrottle ( log , test . maxViews ?? defaultMaxViews , testId , now ) ;
113113 } ,
114114} ) ;
115115
@@ -203,9 +203,9 @@ export const findTestAndVariant = (
203203 hasCountryCode ,
204204 isCountryTargetedForEpic ,
205205 // For the super mode pass, we treat all tests as "always ask" so disable this filter
206- ...( isSuperModePass ? [ ] : [ withinMaxViews ( targeting . epicViewLog || [ ] ) ] ) ,
206+ ...( isSuperModePass ? [ ] : [ withinMaxViews ( targeting . epicViewLog ?? [ ] ) ] ) ,
207207 respectArticleCountOptOut ,
208- withinArticleViewedSettings ( targeting . weeklyArticleHistory || [ ] ) ,
208+ withinArticleViewedSettings ( targeting . weeklyArticleHistory ?? [ ] ) ,
209209 deviceTypeMatchesFilter ( userDeviceType ) ,
210210 correctSignedInStatusFilter ,
211211 momentumMatches ,
@@ -278,7 +278,7 @@ function selectEpicVariant(
278278 banditData : BanditData [ ] ,
279279 targeting : EpicTargeting ,
280280) : Result {
281- const result = selectVariant < EpicVariant , EpicTest > ( test , targeting . mvtId || 1 , banditData ) ;
281+ const result = selectVariant < EpicVariant , EpicTest > ( test , targeting . mvtId ?? 1 , banditData ) ;
282282 return {
283283 result,
284284 } ;
0 commit comments