commit 9e60784851d5fc1e7ca26a52b717cb96098c1194 parent 043923acab19680e6fc01c6b4d92b165c8458f02 Author: Felicitus <felicitus@felicitus.org> Date: Wed, 4 Nov 2015 18:47:21 +0100 Strip trailing slash,fixes #447 Diffstat:
M | src/PartKeepr/FrontendBundle/Resources/public/js/PartKeepr.js | | | 7 | ++++++- |
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/PartKeepr.js b/src/PartKeepr/FrontendBundle/Resources/public/js/PartKeepr.js @@ -575,7 +575,12 @@ PartKeepr.getApplication = function () PartKeepr.getBasePath = function () { - return document.getElementsByTagName('base')[0].href; + var href = document.getElementsByTagName('base')[0].href; + + if(href.substr(-1) === '/') { + return href.substr(0, href.length - 1); + } + return href; }; PartKeepr.getImagePath = function ()