0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-18 02:21:47 -05:00

Merge pull request #2966 from darvelo/trailing-slashes

Fix trailing slashes output app-wide
This commit is contained in:
Hannah Wolfe 2014-06-15 23:45:47 +02:00
commit 4227508c20

View file

@ -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(/\/?$/, '/');
}
});