summaryrefslogtreecommitdiffstats
path: root/packages/kadira-flow-router/lib
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2019-04-20 16:51:57 +0300
committerLauri Ojansivu <x@xet7.org>2019-04-20 16:51:57 +0300
commit02819ca16969b103493ebdd9a66f058995421507 (patch)
treea3352b65083c79ab733db2b99e7c4f0a1276277e /packages/kadira-flow-router/lib
parent53d42a17ffbc6466d2d422dfdcbd867ea31fe082 (diff)
parenta5122cc0764b57a163c3e8ca3e00e703669a98db (diff)
downloadwekan-02819ca16969b103493ebdd9a66f058995421507.tar.gz
wekan-02819ca16969b103493ebdd9a66f058995421507.tar.bz2
wekan-02819ca16969b103493ebdd9a66f058995421507.zip
Merge branch 'edge' into meteor-1.8
Diffstat (limited to 'packages/kadira-flow-router/lib')
-rw-r--r--packages/kadira-flow-router/lib/router.js9
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);
+};