FIX: Don't push browser state if navigated from root url to home page url and vice versa

This commit is contained in:
Vinoth Kannan 2019-03-19 19:22:06 +05:30
parent bdcb0e1efd
commit 0861ca7764
1 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,5 @@
import { defaultHomepage } from "discourse/lib/utilities";
/**
@module Discourse
*/
@ -87,8 +89,11 @@ const DiscourseLocation = Ember.Object.extend({
path = this.formatURL(path);
if (state && state.path !== path) {
const paths = [path, state.path];
if (!(paths.includes("/") && paths.includes(`/${defaultHomepage()}`))) {
this.pushState(path);
}
}
},
/**