Prevent errors if PDFDocumentProxy.saveDocument
is called without the annotationStorage
parameter (PR 12241 follow-up)
Obviously it doesn't make sense to call that method without providing an `AnnotationStorage`-instance, however we should ensure that doing so won't cause errors. Hence we need to check that `annotationStorage` is actually defined, before attempting to call its `resetModified` method.
This commit is contained in:
parent
f2e3d6c819
commit
1f5021d76a
@ -2544,7 +2544,9 @@ class WorkerTransport {
|
||||
filename: this._fullReader ? this._fullReader.filename : null,
|
||||
})
|
||||
.finally(() => {
|
||||
annotationStorage.resetModified();
|
||||
if (annotationStorage) {
|
||||
annotationStorage.resetModified();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user