Skip to content

Commit

Permalink
fix: skip device type check if no devices set (#1737)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasheriques authored Feb 14, 2025
1 parent faf1645 commit 27e9f70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/posthog-surveys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export function doesSurveyUrlMatch(survey: Survey): boolean {
}

export function doesSurveyDeviceTypesMatch(survey: Survey): boolean {
if (!survey.conditions?.deviceTypes) {
if (!survey.conditions?.deviceTypes || survey.conditions?.deviceTypes.length === 0) {
return true
}
// if we dont know the device type, assume it is not a match
Expand Down

0 comments on commit 27e9f70

Please sign in to comment.