File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ function Router (opts) {
79
79
assert ( typeof opts . querystringParser === 'function' , 'querystringParser must be a function' )
80
80
this . querystringParser = opts . querystringParser
81
81
} else {
82
- this . querystringParser = ( query ) => query === '' ? { } : querystring . parse ( query )
82
+ this . querystringParser = ( query ) => query . length === 0 ? { } : querystring . parse ( query )
83
83
}
84
84
85
85
this . caseSensitive = opts . caseSensitive === undefined ? true : opts . caseSensitive
@@ -792,15 +792,15 @@ function getClosingParenthensePosition (path, idx) {
792
792
while ( idx < path . length ) {
793
793
idx ++
794
794
795
- // ignore skipped chars
796
- if ( path [ idx ] === '\\' ) {
795
+ // ignore skipped chars "\"
796
+ if ( path . charCodeAt ( idx ) === 92 ) {
797
797
idx ++
798
798
continue
799
799
}
800
800
801
- if ( path [ idx ] === ')' ) {
801
+ if ( path . charCodeAt ( idx ) === 41 ) {
802
802
parentheses --
803
- } else if ( path [ idx ] === '(' ) {
803
+ } else if ( path . charCodeAt ( idx ) === 40 ) {
804
804
parentheses ++
805
805
}
806
806
You can’t perform that action at this time.
0 commit comments