Skip to content

Commit 63137cd

Browse files
authored
UserAgent fix (#313)
1 parent a59b6fe commit 63137cd

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Sources/Segment/Plugins/Platforms/Vendors/AppleUtils.swift

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,8 @@ internal class MacOSVendorSystem: VendorSystem {
249249
// It has to be fetched on the main thread, so we've spun it off
250250
// async and cache it when it comes back.
251251
if Self.asyncUserAgent == nil {
252-
// it's failing tests because it never comes back; they get stuck.
253-
if isUnitTesting == false {
254-
DispatchQueue.main.async {
255-
Self.asyncUserAgent = WKWebView().value(forKey: "userAgent") as? String
256-
}
252+
DispatchQueue.main.async {
253+
Self.asyncUserAgent = WKWebView().value(forKey: "userAgent") as? String
257254
}
258255
}
259256
return Self.asyncUserAgent

0 commit comments

Comments
 (0)