0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-13 22:41:32 -05:00

Merge pull request #6766 from kevinansfield/fix-trailing-slashes-for-params

Don't add trailing slash to end of url with parameters
This commit is contained in:
Austin Burdine 2016-04-28 07:32:12 -05:00
commit abea119a40

View file

@ -4,7 +4,13 @@ const {HistoryLocation} = Ember;
let trailingHistory = HistoryLocation.extend({
formatURL() {
return this._super(...arguments).replace(/\/?$/, '/');
let url = this._super(...arguments);
if (url.indexOf('?') > 0) {
return url.replace(/([^\/])\?/, '$1/?');
} else {
return url.replace(/\/?$/, '/');
}
}
});