File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change 11771177 var this$1 = this ;
11781178
11791179 this . router = router
1180- this . base = normalizeBae ( base )
1180+ this . base = normalizeBase ( base )
11811181 // start with a route object that stands for "nowhere"
11821182 this . current = createRoute ( null , {
11831183 path : '__vue_router_init__'
12471247 } )
12481248 } ;
12491249
1250- History . prototype . getLocation = function getLocation ( ) {
1251- return '/'
1252- } ;
1253-
1254- function normalizeBae ( base ) {
1250+ function normalizeBase ( base ) {
12551251 if ( ! base ) {
12561252 if ( inBrowser ) {
12571253 // respect <base> tag
14801476 if ( base && path . indexOf ( base ) === 0 ) {
14811477 path = path . slice ( base . length )
14821478 }
1483- return path + window . location . search + window . location . hash
1479+ return ( path || '/' ) + window . location . search + window . location . hash
14841480 }
14851481
14861482 function pushState ( url , replace ) {
15131509 if ( fallback && this . checkFallback ( ) ) {
15141510 return
15151511 }
1512+ ensureSlash ( )
15161513 window . addEventListener ( 'hashchange' , function ( ) {
15171514 this$1 . onHashChange ( )
15181515 } )
15231520 HashHistory . prototype . constructor = HashHistory ;
15241521
15251522 HashHistory . prototype . onInit = function onInit ( ) {
1526- ensureSlash ( )
15271523 // possible redirect on start
15281524 if ( getHash ( ) !== this . current . fullPath ) {
15291525 replaceHash ( this . current . fullPath )
You can’t perform that action at this time.
0 commit comments