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.
|
||||
|
||||
var url = '{{ node.properties.url }}'
|
||||
var push_state = {nodeId: '{{node._id}}', url: url};
|
||||
// console.log('Pushing state ', push_state, ' with URL ', push_url);
|
||||
window.history.pushState(
|
||||
push_state,
|
||||
'{{node.properties.url}}',
|
||||
var replace_state = {nodeId: '{{node._id}}', url: url};
|
||||
window.history.replaceState(
|
||||
replace_state,
|
||||
'{{node.name}}',
|
||||
url
|
||||
);
|
||||
// Generate GA pageview
|
||||
|
Loading…
x
Reference in New Issue
Block a user