FIX: Use proper `replaceState` when updating a location hash
This commit is contained in:
parent
896c23fadc
commit
ea29e1c693
|
@ -6,7 +6,7 @@ const configs = {
|
||||||
"privacy": "privacy_policy_url"
|
"privacy": "privacy_policy_url"
|
||||||
};
|
};
|
||||||
|
|
||||||
export default (page) => {
|
export default function(page) {
|
||||||
return Discourse.Route.extend({
|
return Discourse.Route.extend({
|
||||||
renderTemplate() {
|
renderTemplate() {
|
||||||
this.render("static");
|
this.render("static");
|
||||||
|
|
|
@ -122,7 +122,7 @@ const DiscourseURL = Ember.Object.createWithMixins({
|
||||||
// Scroll to the same page, different anchor
|
// Scroll to the same page, different anchor
|
||||||
if (path.indexOf('#') === 0) {
|
if (path.indexOf('#') === 0) {
|
||||||
this.scrollToId(path);
|
this.scrollToId(path);
|
||||||
history.replaceState(undefined, undefined, path);
|
this.replaceState(path);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue