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:
commit
abea119a40
1 changed files with 7 additions and 1 deletions
|
@ -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(/\/?$/, '/');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue