File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -1149,7 +1149,7 @@ const PDFViewerApplication = {
11491149 this . pdfViewer . setDocument ( null ) ;
11501150 this . pdfLinkService . setDocument ( null ) ;
11511151 this . pdfDocumentProperties ?. setDocument ( null ) ;
1152- this . pdfTextExtractor ?. setDocument ( null ) ;
1152+ this . pdfTextExtractor ?. setViewer ( null ) ;
11531153 }
11541154 this . pdfLinkService . externalLinkEnabled = true ;
11551155 this . store = null ;
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ class PdfTextExtractor {
5050 for ( const pendingRequest of this . #pendingRequests) {
5151 this . extractTextContent ( pendingRequest ) ;
5252 }
53- this . #pendingRequests = new Set ( ) ;
53+ this . #pendingRequests. clear ( ) ;
5454 }
5555 }
5656
@@ -66,8 +66,7 @@ class PdfTextExtractor {
6666 }
6767
6868 if ( ! this . #textPromise) {
69- const textPromise = this . #pdfViewer. getAllText ( ) ;
70- this . #textPromise = textPromise ;
69+ const textPromise = ( this . #textPromise = this . #pdfViewer. getAllText ( ) ) ;
7170
7271 // After the text resolves, cache the text for a little bit in case
7372 // multiple consumers call it.
You can’t perform that action at this time.
0 commit comments