Remove the this._currentUid
property from PDFHistory
, since it's no longer needed
Commit 938dffb06b
, in PR 8885, removed the only actual usage of `this._currentUid` and it can thus be removed.
This commit is contained in:
parent
e279d37181
commit
04d4faefc4
@ -109,7 +109,7 @@ class PDFHistory {
|
||||
this._currentHash = getCurrentHash();
|
||||
this._numPositionUpdates = 0;
|
||||
|
||||
this._currentUid = this._uid = 0;
|
||||
this._uid = 0;
|
||||
this._destination = null;
|
||||
this._position = null;
|
||||
|
||||
@ -266,7 +266,7 @@ class PDFHistory {
|
||||
let shouldReplace = forceReplace || !this._destination;
|
||||
let newState = {
|
||||
fingerprint: this.fingerprint,
|
||||
uid: shouldReplace ? this._currentUid : this._uid,
|
||||
uid: shouldReplace ? this._uid : (this._uid + 1),
|
||||
destination,
|
||||
};
|
||||
|
||||
@ -392,8 +392,7 @@ class PDFHistory {
|
||||
delete destination.temporary;
|
||||
}
|
||||
this._destination = destination;
|
||||
this._currentUid = uid;
|
||||
this._uid = this._currentUid + 1;
|
||||
this._uid = uid;
|
||||
// This should always be reset when `this._destination` is updated.
|
||||
this._numPositionUpdates = 0;
|
||||
}
|
||||
@ -468,7 +467,7 @@ class PDFHistory {
|
||||
(typeof PDFJSDev !== 'undefined' && PDFJSDev.test('CHROME') &&
|
||||
state.chromecomState && !this._isValidState(state))) {
|
||||
// This case corresponds to the user changing the hash of the document.
|
||||
this._currentUid = this._uid;
|
||||
this._uid++;
|
||||
|
||||
let { hash, page, rotation, } = parseCurrentHash(this.linkService);
|
||||
this._pushOrReplaceState({ hash, page, rotation, },
|
||||
|
Loading…
x
Reference in New Issue
Block a user