mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-28 21:33:24 +03:00
Fix trailing slashes output app-wide
closes #2963, closes #2964 - override Ember's `HistoryLocation.formatURL` - remove overridden `HistoryLocation.setURL`
This commit is contained in:
parent
7412493575
commit
aa9db35cfe
@ -1,14 +1,8 @@
|
||||
/*global Ember */
|
||||
|
||||
var trailingHistory = Ember.HistoryLocation.extend({
|
||||
setURL: function (path) {
|
||||
var state = this.getState();
|
||||
path = this.formatURL(path);
|
||||
path = path.replace(/\/?$/, '/');
|
||||
|
||||
if (state && state.path !== path) {
|
||||
this.pushState(path);
|
||||
}
|
||||
formatURL: function () {
|
||||
return this._super.apply(this, arguments).replace(/\/?$/, '/');
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user