Drop third parameter to replaceState/pushState
This was introduced in #3582 to work around https://crbug.com/274024 . The bug in Chrome has been fixed a long time ago (at least 33), so let's simplify the code.
This commit is contained in:
parent
628e70fbb5
commit
e904b8a67c
@ -281,23 +281,10 @@ class PDFHistory {
|
||||
this._updateInternalState(destination, newState.uid);
|
||||
|
||||
if (shouldReplace) {
|
||||
if (typeof PDFJSDev !== 'undefined' &&
|
||||
PDFJSDev.test('FIREFOX || MOZCENTRAL')) {
|
||||
// Providing the third argument causes a SecurityError for file:// URLs.
|
||||
window.history.replaceState(newState, '');
|
||||
} else {
|
||||
window.history.replaceState(newState, '', document.URL);
|
||||
}
|
||||
window.history.replaceState(newState, '');
|
||||
} else {
|
||||
this._maxUid = this._uid;
|
||||
|
||||
if (typeof PDFJSDev !== 'undefined' &&
|
||||
PDFJSDev.test('FIREFOX || MOZCENTRAL')) {
|
||||
// Providing the third argument causes a SecurityError for file:// URLs.
|
||||
window.history.pushState(newState, '');
|
||||
} else {
|
||||
window.history.pushState(newState, '', document.URL);
|
||||
}
|
||||
window.history.pushState(newState, '');
|
||||
}
|
||||
|
||||
if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('CHROME') &&
|
||||
|
Loading…
Reference in New Issue
Block a user