mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Fix the remaining Promise.resolve(undefined)
cases
Many years ago now there were some `Promise` implementations that had issues resolving with an *implicitly* `undefined` value. That should no longer be the case, and we've not been using the `Promise.resolve(undefined)` format for a long time, hence this patch fixes the few remaining cases.
This commit is contained in:
parent
a37bc609e8
commit
cd22c31752
2 changed files with 2 additions and 2 deletions
|
@ -831,7 +831,7 @@ class PDFPageView {
|
|||
renderTask.promise.then(
|
||||
function () {
|
||||
showCanvas();
|
||||
renderCapability.resolve(undefined);
|
||||
renderCapability.resolve();
|
||||
},
|
||||
function (error) {
|
||||
showCanvas();
|
||||
|
|
|
@ -278,7 +278,7 @@ class PDFThumbnailView {
|
|||
draw() {
|
||||
if (this.renderingState !== RenderingStates.INITIAL) {
|
||||
console.error("Must be in new state before drawing");
|
||||
return Promise.resolve(undefined);
|
||||
return Promise.resolve();
|
||||
}
|
||||
const { pdfPage } = this;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue