Skip to content

Commit 0367ef3

Browse files
committed
[build] 2.0.0-rc.1
1 parent 4b52b41 commit 0367ef3

File tree

2 files changed

+23
-5
lines changed

2 files changed

+23
-5
lines changed

dist/vue-router.js

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
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) :
@@ -1353,7 +1358,7 @@
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
@@ -1456,10 +1461,10 @@
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) {
@@ -1649,6 +1654,10 @@
16491654
this.index = 0
16501655
};
16511656

1657+
AbstractHistory.prototype.getLocation = function getLocation () {
1658+
return '/'
1659+
};
1660+
16521661
return AbstractHistory;
16531662
}(History));
16541663

@@ -1734,8 +1743,12 @@
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

0 commit comments

Comments
 (0)