confirm if leaving a modified form without saving

This commit is contained in:
Aki Sasaki 2020-08-18 13:50:23 -07:00
parent 965d20db2a
commit 83365a3756
4 changed files with 94 additions and 6 deletions

View file

@ -2536,12 +2536,16 @@ class WorkerTransport {
}
saveDocument(annotationStorage) {
return this.messageHandler.sendWithPromise("SaveDocument", {
numPages: this._numPages,
annotationStorage:
(annotationStorage && annotationStorage.getAll()) || null,
filename: this._fullReader.filename,
});
return this.messageHandler
.sendWithPromise("SaveDocument", {
numPages: this._numPages,
annotationStorage:
(annotationStorage && annotationStorage.getAll()) || null,
filename: this._fullReader.filename,
})
.finally(() => {
annotationStorage.resetModified();
});
}
getDestinations() {