Skip to content

Commit

Permalink
[build] 2.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Apr 25, 2017
1 parent 4ea7730 commit d682c0d
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 20 deletions.
19 changes: 13 additions & 6 deletions dist/vue-router.common.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* vue-router v2.5.1
* vue-router v2.5.2
* (c) 2017 Evan You
* @license MIT
*/
Expand Down Expand Up @@ -28,14 +28,17 @@ var View = {
default: 'default'
}
},
render: function render (h, ref) {
render: function render (_, ref) {
var props = ref.props;
var children = ref.children;
var parent = ref.parent;
var data = ref.data;

data.routerView = true;

// directly use parent context's createElement() function
// so that components rendered by router-view can resolve named slots
var h = parent.$createElement;
var name = props.name;
var route = parent.$route;
var cache = parent._routerViewCache || (parent._routerViewCache = {});
Expand Down Expand Up @@ -1686,7 +1689,7 @@ History.prototype.confirmTransition = function confirmTransition (route, onCompl

var current = this.current;
var abort = function (err) {
if (err instanceof Error) {
if (isError(err)) {
if (this$1.errorCbs.length) {
this$1.errorCbs.forEach(function (cb) { cb(err); });
} else {
Expand Down Expand Up @@ -1730,7 +1733,7 @@ History.prototype.confirmTransition = function confirmTransition (route, onCompl
}
try {
hook(route, current, function (to) {
if (to === false || to instanceof Error) {
if (to === false || isError(to)) {
// next(false) -> abort navigation, ensure current URL
this$1.ensureURL(true);
abort(to);
Expand Down Expand Up @@ -1950,7 +1953,7 @@ function resolveAsyncComponents (matched) {
var msg = "Failed to resolve async component " + key + ": " + reason;
process.env.NODE_ENV !== 'production' && warn(false, msg);
if (!error) {
error = reason instanceof Error
error = isError(reason)
? reason
: new Error(msg);
next(error);
Expand Down Expand Up @@ -2011,6 +2014,10 @@ function once (fn) {
}
}

function isError (err) {
return Object.prototype.toString.call(err).indexOf('Error') > -1
}

/* */


Expand Down Expand Up @@ -2446,7 +2453,7 @@ function createHref (base, fullPath, mode) {
}

VueRouter.install = install;
VueRouter.version = '2.5.1';
VueRouter.version = '2.5.2';

if (inBrowser && window.Vue) {
window.Vue.use(VueRouter);
Expand Down
19 changes: 13 additions & 6 deletions dist/vue-router.esm.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* vue-router v2.5.1
* vue-router v2.5.2
* (c) 2017 Evan You
* @license MIT
*/
Expand All @@ -26,14 +26,17 @@ var View = {
default: 'default'
}
},
render: function render (h, ref) {
render: function render (_, ref) {
var props = ref.props;
var children = ref.children;
var parent = ref.parent;
var data = ref.data;

data.routerView = true;

// directly use parent context's createElement() function
// so that components rendered by router-view can resolve named slots
var h = parent.$createElement;
var name = props.name;
var route = parent.$route;
var cache = parent._routerViewCache || (parent._routerViewCache = {});
Expand Down Expand Up @@ -1684,7 +1687,7 @@ History.prototype.confirmTransition = function confirmTransition (route, onCompl

var current = this.current;
var abort = function (err) {
if (err instanceof Error) {
if (isError(err)) {
if (this$1.errorCbs.length) {
this$1.errorCbs.forEach(function (cb) { cb(err); });
} else {
Expand Down Expand Up @@ -1728,7 +1731,7 @@ History.prototype.confirmTransition = function confirmTransition (route, onCompl
}
try {
hook(route, current, function (to) {
if (to === false || to instanceof Error) {
if (to === false || isError(to)) {
// next(false) -> abort navigation, ensure current URL
this$1.ensureURL(true);
abort(to);
Expand Down Expand Up @@ -1948,7 +1951,7 @@ function resolveAsyncComponents (matched) {
var msg = "Failed to resolve async component " + key + ": " + reason;
process.env.NODE_ENV !== 'production' && warn(false, msg);
if (!error) {
error = reason instanceof Error
error = isError(reason)
? reason
: new Error(msg);
next(error);
Expand Down Expand Up @@ -2009,6 +2012,10 @@ function once (fn) {
}
}

function isError (err) {
return Object.prototype.toString.call(err).indexOf('Error') > -1
}

/* */


Expand Down Expand Up @@ -2444,7 +2451,7 @@ function createHref (base, fullPath, mode) {
}

VueRouter.install = install;
VueRouter.version = '2.5.1';
VueRouter.version = '2.5.2';

if (inBrowser && window.Vue) {
window.Vue.use(VueRouter);
Expand Down
19 changes: 13 additions & 6 deletions dist/vue-router.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* vue-router v2.5.1
* vue-router v2.5.2
* (c) 2017 Evan You
* @license MIT
*/
Expand Down Expand Up @@ -32,14 +32,17 @@ var View = {
default: 'default'
}
},
render: function render (h, ref) {
render: function render (_, ref) {
var props = ref.props;
var children = ref.children;
var parent = ref.parent;
var data = ref.data;

data.routerView = true;

// directly use parent context's createElement() function
// so that components rendered by router-view can resolve named slots
var h = parent.$createElement;
var name = props.name;
var route = parent.$route;
var cache = parent._routerViewCache || (parent._routerViewCache = {});
Expand Down Expand Up @@ -1690,7 +1693,7 @@ History.prototype.confirmTransition = function confirmTransition (route, onCompl

var current = this.current;
var abort = function (err) {
if (err instanceof Error) {
if (isError(err)) {
if (this$1.errorCbs.length) {
this$1.errorCbs.forEach(function (cb) { cb(err); });
} else {
Expand Down Expand Up @@ -1734,7 +1737,7 @@ History.prototype.confirmTransition = function confirmTransition (route, onCompl
}
try {
hook(route, current, function (to) {
if (to === false || to instanceof Error) {
if (to === false || isError(to)) {
// next(false) -> abort navigation, ensure current URL
this$1.ensureURL(true);
abort(to);
Expand Down Expand Up @@ -1954,7 +1957,7 @@ function resolveAsyncComponents (matched) {
var msg = "Failed to resolve async component " + key + ": " + reason;
"development" !== 'production' && warn(false, msg);
if (!error) {
error = reason instanceof Error
error = isError(reason)
? reason
: new Error(msg);
next(error);
Expand Down Expand Up @@ -2015,6 +2018,10 @@ function once (fn) {
}
}

function isError (err) {
return Object.prototype.toString.call(err).indexOf('Error') > -1
}

/* */


Expand Down Expand Up @@ -2450,7 +2457,7 @@ function createHref (base, fullPath, mode) {
}

VueRouter.install = install;
VueRouter.version = '2.5.1';
VueRouter.version = '2.5.2';

if (inBrowser && window.Vue) {
window.Vue.use(VueRouter);
Expand Down
Loading

0 comments on commit d682c0d

Please sign in to comment.