mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Prevent if (!state || false) {
in the output, in PDFHistory._popState
, for e.g. MOZCENTRAL builds
By re-ordering the condition, which includes a `PDFJSDev` check, we can avoid meaningless output in the built files.
This commit is contained in:
parent
c5f2f870cb
commit
1fab637247
1 changed files with 3 additions and 3 deletions
|
@ -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++;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue