mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-03-25 06:11:20 -04:00
Merge pull request #634 from wojciechka/master
Allow handling of back/forward buttons in browser when running with prefix (i.e. as /discourse)
This commit is contained in:
commit
59e4e77190
1 changed files with 6 additions and 1 deletions
|
@ -153,7 +153,12 @@ Ember.DiscourseLocation = Ember.Object.extend({
|
|||
if (e.state) {
|
||||
var currentState = self.get('currentState');
|
||||
if (currentState) {
|
||||
callback(e.state.path);
|
||||
var url = e.state.path,
|
||||
rootURL = get(self, 'rootURL');
|
||||
|
||||
rootURL = rootURL.replace(/\/$/, '');
|
||||
url = url.replace(rootURL, '');
|
||||
callback(url);
|
||||
} else {
|
||||
this.set('currentState', e.state);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue