Skip to content

Commit

Permalink
fix bug of path comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
smhjsw committed Mar 4, 2015
1 parent 03d7c84 commit bd7e562
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions HHRouter/HHRouter.m
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@ - (NSDictionary*)paramsInRoute:(NSString*)route

NSMutableDictionary* subRoutes = self.routes;
NSArray* pathComponents =
[self pathComponentsFromRoute:[self stringFromFilterAppUrlScheme:route]];
[self pathComponentsFromRoute:[self stringFromFilterAppUrlScheme:route]];
for (NSString* pathComponent in pathComponents) {
BOOL found = NO;
NSArray* subRoutesKeys = subRoutes.allKeys;
for (NSString* key in subRoutesKeys) {
if ([key isEqualToString:pathComponent]) {
if ([subRoutesKeys containsObject:pathComponent]) {
found = YES;
subRoutes = subRoutes[key];
subRoutes = subRoutes[pathComponent];
break;
} else if ([key hasPrefix:@":"]) {
found = YES;
Expand Down

0 comments on commit bd7e562

Please sign in to comment.