FIX: Don't push browser state if navigated from root url to home page url and vice versa
This commit is contained in:
parent
bdcb0e1efd
commit
0861ca7764
|
@ -1,3 +1,5 @@
|
||||||
|
import { defaultHomepage } from "discourse/lib/utilities";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@module Discourse
|
@module Discourse
|
||||||
*/
|
*/
|
||||||
|
@ -87,7 +89,10 @@ const DiscourseLocation = Ember.Object.extend({
|
||||||
path = this.formatURL(path);
|
path = this.formatURL(path);
|
||||||
|
|
||||||
if (state && state.path !== path) {
|
if (state && state.path !== path) {
|
||||||
this.pushState(path);
|
const paths = [path, state.path];
|
||||||
|
if (!(paths.includes("/") && paths.includes(`/${defaultHomepage()}`))) {
|
||||||
|
this.pushState(path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue