Address review feedback
This commit is contained in:
parent
26360c3e63
commit
b7708da368
@ -1149,7 +1149,7 @@ const PDFViewerApplication = {
|
||||
this.pdfViewer.setDocument(null);
|
||||
this.pdfLinkService.setDocument(null);
|
||||
this.pdfDocumentProperties?.setDocument(null);
|
||||
this.pdfTextExtractor?.setDocument(null);
|
||||
this.pdfTextExtractor?.setViewer(null);
|
||||
}
|
||||
this.pdfLinkService.externalLinkEnabled = true;
|
||||
this.store = null;
|
||||
|
||||
@ -50,7 +50,7 @@ class PdfTextExtractor {
|
||||
for (const pendingRequest of this.#pendingRequests) {
|
||||
this.extractTextContent(pendingRequest);
|
||||
}
|
||||
this.#pendingRequests = new Set();
|
||||
this.#pendingRequests.clear();
|
||||
}
|
||||
}
|
||||
|
||||
@ -66,8 +66,7 @@ class PdfTextExtractor {
|
||||
}
|
||||
|
||||
if (!this.#textPromise) {
|
||||
const textPromise = this.#pdfViewer.getAllText();
|
||||
this.#textPromise = textPromise;
|
||||
const textPromise = (this.#textPromise = this.#pdfViewer.getAllText());
|
||||
|
||||
// After the text resolves, cache the text for a little bit in case
|
||||
// multiple consumers call it.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user