mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 14:03:48 +03:00
6aab6c5904
closes #2963, closes #2964 - override Ember's `HistoryLocation.formatURL` - remove overridden `HistoryLocation.setURL`
17 lines
455 B
JavaScript
17 lines
455 B
JavaScript
/*global Ember */
|
|
|
|
var trailingHistory = Ember.HistoryLocation.extend({
|
|
formatURL: function () {
|
|
return this._super.apply(this, arguments).replace(/\/?$/, '/');
|
|
}
|
|
});
|
|
|
|
var registerTrailingLocationHistory = {
|
|
name: 'registerTrailingLocationHistory',
|
|
|
|
initialize: function (container, application) {
|
|
application.register('location:trailing-history', trailingHistory);
|
|
}
|
|
};
|
|
|
|
export default registerTrailingLocationHistory; |