cherrytreex
Advanced tools
Comparing version 3.1.0 to 3.2.0
@@ -768,2 +768,5 @@ import pathToRegexp from 'path-to-regexp'; | ||
router.middleware.forEach(function (m) { | ||
m.cancel && m.cancel(transition, err); | ||
}); | ||
reject(err); | ||
@@ -1122,3 +1125,10 @@ }, | ||
location.onChange(function (url) { | ||
return _this.dispatch(url); | ||
var previousUrl = _this.state.path; | ||
_this.dispatch(url).catch(function (err) { | ||
if (err && err.type === TRANSITION_CANCELLED) { | ||
// reset the URL in case the transition has been cancelled | ||
_this.location.replaceURL(previousUrl, { trigger: false }); | ||
} | ||
return err; | ||
}); | ||
}); | ||
@@ -1125,0 +1135,0 @@ // start intercepting links |
{ | ||
"name": "cherrytreex", | ||
"version": "3.1.0", | ||
"version": "3.2.0", | ||
"description": "Cherrytree - a flexible hierarchical client side router", | ||
@@ -5,0 +5,0 @@ "main": "cherrytree.js", |
Sorry, the diff of this file is not supported yet
126988
1214