Skip to content

Commit 7a63a0e

Browse files
committed
fix: tolerate Safari private mode detection failures
1 parent 83995ec commit 7a63a0e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

SimplyTrack/Services/WebTrackingService.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,10 @@ class WebTrackingService {
121121
return nil
122122
}
123123

124-
// Check if private browsing is active and tracking is disabled
124+
// Check if private browsing is active and tracking is disabled.
125+
// Detection can fail transiently, especially for Safari via System Events; only block on confirmed private mode.
125126
if !trackPrivateBrowsing {
126-
guard let isPrivateBrowsing = browser.isInPrivateBrowsingMode(), !isPrivateBrowsing else {
127+
if browser.isInPrivateBrowsingMode() == true {
127128
return nil
128129
}
129130
}

0 commit comments

Comments
 (0)