Skip to content

Commit

Permalink
fix: don't call stringValue of strings (#253)
Browse files Browse the repository at this point in the history
  • Loading branch information
leethree authored Jan 8, 2021
1 parent 67a62b6 commit 226a9e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/core/ios/RNAnalytics/RNAnalytics.m
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,19 @@ +(void)initialize {
NSURLComponents *components = [NSURLComponents componentsWithURL:url resolvingAgainstBaseURL:NO];

if ([proxyOptions valueForKey:@"scheme"]) {
components.scheme = [proxyOptions[@"scheme"] stringValue];
components.scheme = proxyOptions[@"scheme"];
}

if ([proxyOptions valueForKey:@"host"]) {
components.host = [proxyOptions[@"host"] stringValue];
components.host = proxyOptions[@"host"];
}

if ([proxyOptions valueForKey:@"port"]) {
components.port = [NSNumber numberWithInt:[proxyOptions[@"port"] intValue]];
}

if ([proxyOptions valueForKey:@"path"]) {
components.path = [[proxyOptions[@"path"] stringValue] stringByAppendingString:components.path];
components.path = [proxyOptions[@"path"] stringByAppendingString:components.path];
}

NSURL *transformedURL = components.URL;
Expand Down

0 comments on commit 226a9e4

Please sign in to comment.