diff --git a/Source/Compass.swift b/Source/Compass.swift index 6632340..716dc76 100644 --- a/Source/Compass.swift +++ b/Source/Compass.swift @@ -26,7 +26,7 @@ public struct Compass { .map(String.init)) .first else { continue } - if query.hasPrefix(prefix) || prefix.hasPrefix(query) { + if query.hasPrefix(prefix) && prefix.hasPrefix(query) { let queryString = query.stringByReplacingOccurrencesOfString(prefix, withString: "") let queryArguments = splitString(queryString, delimiter: ":") let routeArguments = splitString(route, delimiter: ":").filter { $0.containsString("{") }