Merge pull request #10461 from Snuffleupagus/pr-10423

Avoid setting incorrect document URLs, in IE 11, when the browser history is updated (PR 10423 follow-up)
This commit is contained in:
Tim van der Meij 2019-01-16 22:51:50 +01:00 committed by GitHub
commit 697b3d2f49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -306,10 +306,18 @@ class PDFHistory {
}
}
if (shouldReplace) {
window.history.replaceState(newState, '', newUrl);
if (newUrl) {
window.history.replaceState(newState, '', newUrl);
} else {
window.history.replaceState(newState, '');
}
} else {
this._maxUid = this._uid;
window.history.pushState(newState, '', newUrl);
if (newUrl) {
window.history.pushState(newState, '', newUrl);
} else {
window.history.pushState(newState, '');
}
}
if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('CHROME') &&