From 73e265d8fd050ae3daa67472b4465a5c49d68910 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Sat, 20 Apr 2019 15:18:33 +0300 Subject: Include to Wekan packages directory contents, so that meteor command would build all directly. This also simplifies build scripts. Thanks to xet7 ! --- packages/kadira-flow-router/lib/router.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 packages/kadira-flow-router/lib/router.js (limited to 'packages/kadira-flow-router/lib/router.js') diff --git a/packages/kadira-flow-router/lib/router.js b/packages/kadira-flow-router/lib/router.js new file mode 100644 index 00000000..c0c9abc6 --- /dev/null +++ b/packages/kadira-flow-router/lib/router.js @@ -0,0 +1,9 @@ +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); +}; -- cgit v1.2.3-1-g7c22