diff --git a/CHANGELOG.md b/CHANGELOG.md index 711095f..c2fa7d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,5 @@ # Changelog -### next -* Fix the url generation for prefixed paths. See: [#508](https://github.com/kadirahq/flow-router/issues/508) - ### v2.10.0 * Update few dependencies to the latest versions: pagejs, qs, cosmos:browserify @@ -20,7 +17,7 @@ ### v2.6.1 -* Fix [#143](https://github.com/kadirahq/flow-router/issues/314). +* Fix [#143](https://github.com/kadirahq/flow-router/issues/314). This says that when we are doing a trigger redirect, We won't get reactive changes like: `getRouteName()` @@ -56,7 +53,7 @@ * Use pagejs.redirect() for our redirection process. * Above fixes [#239](https://github.com/kadirahq/flow-router/issues/239) -### v2.0.0 +### v2.0.0 * Released 2.0 :) * Now flow-router comes as `kadira:flow-router` diff --git a/lib/router.js b/lib/router.js index ba9c84d..08310e8 100644 --- a/lib/router.js +++ b/lib/router.js @@ -1,9 +1,4 @@ Router.prototype.url = function() { - // We need to remove the leading base path, or "/", as it will be inserted - // automatically by `Meteor.absoluteUrl` as documented in: - // http://docs.meteor.com/#/full/meteor_absoluteurl - var completePath = this.path.apply(this, arguments); - var basePath = this._basePath || '/'; - var pathWithoutBase = completePath.replace(new RegExp('^' + basePath), ''); - return Meteor.absoluteUrl(pathWithoutBase); + var path = this.path.apply(this, arguments); + return Meteor.absoluteUrl(path.replace(/^\//, '')); };