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,8 +89,11 @@ const DiscourseLocation = Ember.Object.extend({
|
||||||
path = this.formatURL(path);
|
path = this.formatURL(path);
|
||||||
|
|
||||||
if (state && state.path !== path) {
|
if (state && state.path !== path) {
|
||||||
|
const paths = [path, state.path];
|
||||||
|
if (!(paths.includes("/") && paths.includes(`/${defaultHomepage()}`))) {
|
||||||
this.pushState(path);
|
this.pushState(path);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue