File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 14151415 // Are we at the app root?
14161416 atRoot : function ( ) {
14171417 var path = this . location . pathname . replace ( / [ ^ \/ ] $ / , '$&/' ) ;
1418- return path === this . root && ! this . location . search ;
1418+ return path === this . root && ! this . getSearch ( ) ;
1419+ } ,
1420+
1421+ // In IE6, the hash fragment and search params are incorrect if the
1422+ // fragment contains `?`.
1423+ getSearch : function ( ) {
1424+ var match = this . location . href . replace ( / # .* / , '' ) . match ( / \? .+ / ) ;
1425+ return match ? match [ 0 ] : '' ;
14191426 } ,
14201427
14211428 // Gets the true hash value. Cannot use location.hash directly due to bug
14271434
14281435 // Get the pathname and search params, without the root.
14291436 getPath : function ( ) {
1430- var path = decodeURI ( this . location . pathname + this . location . search ) ;
1437+ var path = decodeURI ( this . location . pathname + this . getSearch ( ) ) ;
14311438 var root = this . root . slice ( 0 , - 1 ) ;
14321439 if ( ! path . indexOf ( root ) ) path = path . slice ( root . length ) ;
14331440 return path . slice ( 1 ) ;
You can’t perform that action at this time.
0 commit comments