diff options
author | Lauri Ojansivu <x@xet7.org> | 2019-04-20 15:18:33 +0300 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2019-04-20 15:18:33 +0300 |
commit | 73e265d8fd050ae3daa67472b4465a5c49d68910 (patch) | |
tree | 677b233934a43d8f873e24c794ce289d85e3a9b7 /packages/kadira-flow-router/lib/router.js | |
parent | 6117097a93bfb11c8bd4c87a23c44a50e22ceb87 (diff) | |
download | wekan-73e265d8fd050ae3daa67472b4465a5c49d68910.tar.gz wekan-73e265d8fd050ae3daa67472b4465a5c49d68910.tar.bz2 wekan-73e265d8fd050ae3daa67472b4465a5c49d68910.zip |
Include to Wekan packages directory contents, so that meteor command would build all directly.
This also simplifies build scripts.
Thanks to xet7 !
Diffstat (limited to 'packages/kadira-flow-router/lib/router.js')
-rw-r--r-- | packages/kadira-flow-router/lib/router.js | 9 |
1 files changed, 9 insertions, 0 deletions
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); +}; |