Use await even more in the "SaveDocument" worker-thread handler

Given that the function is already asynchronous we can make use of `await` even more and reduce the amount of indentation a little bit.
This commit is contained in:
Jonas Jenwald 2023-09-16 13:06:48 +02:00
parent 4dd197ae3f
commit ff96c413d3

View File

@ -588,8 +588,8 @@ class WorkerMessageHandler {
);
}
}
const refs = await Promise.all(promises);
return Promise.all(promises).then(refs => {
let newRefs = [];
let xfaData = null;
if (isPureXfa) {
@ -671,7 +671,6 @@ class WorkerMessageHandler {
}).finally(() => {
xref.resetNewTemporaryRef();
});
});
}
);