Skip to content
This repository was archived by the owner on Aug 16, 2023. It is now read-only.

Commit d7d6476

Browse files
committed
Pass test with empty query string
1 parent 34cb424 commit d7d6476

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

CMDQueryStringSerialization/CMDQueryStringSerialization.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ - (NSString *)cmd_stringByRemovingEscapes {
7878

7979

8080
- (void)cmd_enumeratePairs:(void (^) (NSString *key, NSString *value))block {
81+
if ([self length] == 0) {
82+
return;
83+
}
8184
NSArray *pairs = [self componentsSeparatedByString:@"&"];
8285
[pairs enumerateObjectsUsingBlock:^(NSString *pair, NSUInteger index, BOOL *stop) {
8386
NSRange range = [pair rangeOfString:@"="];

0 commit comments

Comments
 (0)