Skip to content

Commit

Permalink
Merge pull request #10461 from Snuffleupagus/pr-10423
Browse files Browse the repository at this point in the history
Avoid setting incorrect document URLs, in IE 11, when the browser history is updated (PR 10423 follow-up)
  • Loading branch information
timvandermeij authored Jan 16, 2019
2 parents f711df5 + ffe7981 commit 697b3d2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions web/pdf_history.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') &&
Expand Down

0 comments on commit 697b3d2

Please sign in to comment.