diff --git a/web/pdf_history.js b/web/pdf_history.js index 0e4221aba..b28ce323d 100644 --- a/web/pdf_history.js +++ b/web/pdf_history.js @@ -527,9 +527,9 @@ class PDFHistory { let newHash = getCurrentHash(), hashChanged = this._currentHash !== newHash; this._currentHash = newHash; - if (!state || - (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('CHROME') && - state.chromecomState && !this._isValidState(state))) { + if ((typeof PDFJSDev !== 'undefined' && PDFJSDev.test('CHROME') && + state && state.chromecomState && !this._isValidState(state)) || + !state) { // This case corresponds to the user changing the hash of the document. this._uid++;