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
@ -527,9 +527,9 @@ class PDFHistory {
|
|||||||
let newHash = getCurrentHash(), hashChanged = this._currentHash !== newHash;
|
let newHash = getCurrentHash(), hashChanged = this._currentHash !== newHash;
|
||||||
this._currentHash = newHash;
|
this._currentHash = newHash;
|
||||||
|
|
||||||
if (!state ||
|
if ((typeof PDFJSDev !== 'undefined' && PDFJSDev.test('CHROME') &&
|
||||||
(typeof PDFJSDev !== 'undefined' && PDFJSDev.test('CHROME') &&
|
state && state.chromecomState && !this._isValidState(state)) ||
|
||||||
state.chromecomState && !this._isValidState(state))) {
|
!state) {
|
||||||
// This case corresponds to the user changing the hash of the document.
|
// This case corresponds to the user changing the hash of the document.
|
||||||
this._uid++;
|
this._uid++;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user