mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 23:28:06 +02:00
Added Promise.catch
Fixed Promise so it rejects on uncaught exception Catch possible rejection on ViewHistory.setMultiple
This commit is contained in:
parent
d2da73b8c4
commit
37c3641fad
3 changed files with 19 additions and 4 deletions
|
@ -101,7 +101,7 @@ var ViewHistory = (function ViewHistoryClosure() {
|
|||
return;
|
||||
}
|
||||
this.file[name] = val;
|
||||
this._writeToStorage();
|
||||
return this._writeToStorage();
|
||||
},
|
||||
|
||||
setMultiple: function ViewHistory_setMultiple(properties) {
|
||||
|
@ -111,7 +111,7 @@ var ViewHistory = (function ViewHistoryClosure() {
|
|||
for (var name in properties) {
|
||||
this.file[name] = properties[name];
|
||||
}
|
||||
this._writeToStorage();
|
||||
return this._writeToStorage();
|
||||
},
|
||||
|
||||
get: function ViewHistory_get(name, defaultValue) {
|
||||
|
|
|
@ -1983,6 +1983,8 @@ function updateViewarea() {
|
|||
'zoom': normalizedScaleValue,
|
||||
'scrollLeft': intLeft,
|
||||
'scrollTop': intTop
|
||||
}).catch(function() {
|
||||
// unable to write to storage
|
||||
});
|
||||
});
|
||||
var href = PDFView.getAnchorUrl(pdfOpenParams);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue