Fix Code Editor Changes Creating Duplicate History Entries
Closes #4167
This commit is contained in:
@ -136,8 +136,16 @@ common.codeUri = (function(common, encode, decode, location, history) {
|
||||
if (!codeUri.enabled) {
|
||||
return null;
|
||||
}
|
||||
if (history && typeof history.replaceState === 'function') {
|
||||
history.replaceState(
|
||||
history.state,
|
||||
null,
|
||||
'?solution=' + codeUri.encode(encodeFcc(solution))
|
||||
);
|
||||
} else {
|
||||
location.hash = '?solution=' +
|
||||
codeUri.encode(encodeFcc(solution));
|
||||
}
|
||||
|
||||
return solution;
|
||||
},
|
||||
|
Reference in New Issue
Block a user