File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
iOS_SDK/OneSignalSDK/Source Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,9 @@ -(void)attachBodyToRequest:(NSMutableURLRequest *)request withParameters:(NSDict
106106
107107 NSRegularExpression *eidRegex = [NSRegularExpression regularExpressionWithPattern: @" (?<=\" external_user_id\" :\" ).*\\ /.*?(?=\" ,|\"\\ })" options: 0 error: &error];
108108 NSArray *matches = [eidRegex matchesInString: requestString options: 0 range: NSMakeRange (0 , [requestString length ])];
109- for (NSTextCheckingResult *match in matches) {
109+
110+ if ([matches count ] > 0 ) {
111+ NSTextCheckingResult *match = matches[0 ];
110112 NSString *matched = [requestString substringWithRange: [match range ]];
111113 NSString *unescapedEID = [matched stringByReplacingOccurrencesOfString: @" \\ /" withString: @" /" ];
112114 requestString = [requestString stringByReplacingOccurrencesOfString: matched withString: unescapedEID];
You can’t perform that action at this time.
0 commit comments