mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 09:45:42 +02:00
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:
parent
4dd197ae3f
commit
ff96c413d3
1 changed files with 73 additions and 74 deletions
|
@ -588,8 +588,8 @@ class WorkerMessageHandler {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const refs = await Promise.all(promises);
|
||||||
|
|
||||||
return Promise.all(promises).then(refs => {
|
|
||||||
let newRefs = [];
|
let newRefs = [];
|
||||||
let xfaData = null;
|
let xfaData = null;
|
||||||
if (isPureXfa) {
|
if (isPureXfa) {
|
||||||
|
@ -671,7 +671,6 @@ class WorkerMessageHandler {
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
xref.resetNewTemporaryRef();
|
xref.resetNewTemporaryRef();
|
||||||
});
|
});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue