File tree Expand file tree Collapse file tree 2 files changed +23
-5
lines changed Expand file tree Collapse file tree 2 files changed +23
-5
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * vue-router v2.0.0-rc.1
3+ * (c) 2016 Evan You
4+ * @license MIT
5+ */
16( function ( global , factory ) {
27 typeof exports === 'object' && typeof module !== 'undefined' ? module . exports = factory ( ) :
38 typeof define === 'function' && define . amd ? define ( factory ) :
13531358 return isNumber ( obj . x ) || isNumber ( obj . y )
13541359 }
13551360
1356- function normalizePosotion ( obj ) {
1361+ function normalizePosition ( obj ) {
13571362 return {
13581363 x : isNumber ( obj . x ) ? obj . x : window . pageXOffset ,
13591364 y : isNumber ( obj . y ) ? obj . y : window . pageYOffset
14561461 if ( el ) {
14571462 position = getElementPosition ( el )
14581463 } else if ( isValidPosition ( shouldScroll ) ) {
1459- position = normalizePosotion ( shouldScroll )
1464+ position = normalizePosition ( shouldScroll )
14601465 }
14611466 } else if ( isObject && isValidPosition ( shouldScroll ) ) {
1462- position = normalizePosotion ( shouldScroll )
1467+ position = normalizePosition ( shouldScroll )
14631468 }
14641469
14651470 if ( position ) {
16491654 this . index = 0
16501655 } ;
16511656
1657+ AbstractHistory . prototype . getLocation = function getLocation ( ) {
1658+ return '/'
1659+ } ;
1660+
16521661 return AbstractHistory ;
16531662 } ( History ) ) ;
16541663
17341743 } ;
17351744
17361745 VueRouter . prototype . setInitialLocation = function setInitialLocation ( location ) {
1746+ var route = this . match ( location )
17371747 if ( this . history instanceof AbstractHistory ) {
1738- this . history . setInitialRoute ( this . match ( location ) )
1748+ this . history . setInitialRoute ( route )
1749+ }
1750+ if ( this . app ) {
1751+ this . app . _route = route
17391752 }
17401753 } ;
17411754
You can’t perform that action at this time.
0 commit comments