Skip to content

Commit

Permalink
Merge pull request #20 from hyperoslo/fix/condition
Browse files Browse the repository at this point in the history
Fix URL or URI condition logic
  • Loading branch information
vadymmarkov committed Dec 22, 2015
2 parents 8a26687 + f22fc9f commit f7e3395
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Compass.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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("{") }
Expand Down

0 comments on commit f7e3395

Please sign in to comment.