Skip to content

Commit

Permalink
fix apiHost comparison SegmentDestination.swift (#314)
Browse files Browse the repository at this point in the history
  • Loading branch information
pietropizzi authored Mar 21, 2024
1 parent 718a26a commit fa5bc72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Segment/Plugins/SegmentDestination.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public class SegmentDestination: DestinationPlugin, Subscriber, FlushCompletion
*/
// if customer specifies a different apiHost (ie: eu1.segmentapis.com) at app.segment.com ...
if let host = segmentInfo?[Self.Constants.apiHost.rawValue] as? String, host.isEmpty == false {
if host != analytics.configuration.values.writeKey {
if host != analytics.configuration.values.apiHost {
analytics.configuration.values.apiHost = host
httpClient = HTTPClient(analytics: analytics)
}
Expand Down

0 comments on commit fa5bc72

Please sign in to comment.