Skip to content

Commit 5e14763

Browse files
committed
ignoring url parameters for route matching
1 parent 70b36f9 commit 5e14763

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/http/router.coffee

+6-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@ class exports.Router
2121
else
2222
if url == '/'
2323
return false
24-
sr = url.split('/')
24+
25+
if url.indexOf('?') >= 0
26+
sr = url.split('?')
27+
else
28+
sr = url.split('/')
29+
2530
sr.pop()
2631
newUrl = sr.join('/')
2732
newUrl = '/' unless newUrl.length > 0

0 commit comments

Comments
 (0)