On Page load use replaceState instead of pushState
Fix T50797 and replace the id-based url with a custom url for page in the browser's history.
This commit is contained in:
parent
6765276519
commit
e381ca774e
@ -34,11 +34,10 @@ script.
|
|||||||
// skip the project-level displayNode push.
|
// skip the project-level displayNode push.
|
||||||
|
|
||||||
var url = '{{ node.properties.url }}'
|
var url = '{{ node.properties.url }}'
|
||||||
var push_state = {nodeId: '{{node._id}}', url: url};
|
var replace_state = {nodeId: '{{node._id}}', url: url};
|
||||||
// console.log('Pushing state ', push_state, ' with URL ', push_url);
|
window.history.replaceState(
|
||||||
window.history.pushState(
|
replace_state,
|
||||||
push_state,
|
'{{node.name}}',
|
||||||
'{{node.properties.url}}',
|
|
||||||
url
|
url
|
||||||
);
|
);
|
||||||
// Generate GA pageview
|
// Generate GA pageview
|
||||||
|
Loading…
x
Reference in New Issue
Block a user