Small refactoring of the code that calls |PDFViewerApplication.setInitialView|
This is a minor cleanup, to avoid an unnecessary `Promise.all` and to simplify catching |ViewHistory| errors.
This commit is contained in:
parent
6091e7bd6b
commit
e5c4819601
@ -886,10 +886,8 @@ var PDFViewerApplication = {
|
||||
}
|
||||
PDFHistory.initialize(self.documentFingerprint, self);
|
||||
}
|
||||
});
|
||||
|
||||
var storePromise = store.initializedPromise;
|
||||
Promise.all([firstPagePromise, storePromise]).then(function resolved() {
|
||||
store.initializedPromise.then(function resolved() {
|
||||
var storedHash = null;
|
||||
if (self.preferenceShowPreviousViewOnLoad &&
|
||||
store.get('exists', false)) {
|
||||
@ -916,8 +914,6 @@ var PDFViewerApplication = {
|
||||
}
|
||||
}, function rejected(reason) {
|
||||
console.error(reason);
|
||||
|
||||
firstPagePromise.then(function () {
|
||||
self.setInitialView(null, scale);
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user