mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 09:45:42 +02:00
Merge pull request #15215 from Snuffleupagus/optional-content-initial
[api-minor] Improve how we disable `PDFThumbnailView.setImage` for documents with Optional Content
This commit is contained in:
commit
c7b71a3376
5 changed files with 140 additions and 62 deletions
|
@ -1856,6 +1856,7 @@ class BaseViewer {
|
|||
return Promise.resolve(null);
|
||||
}
|
||||
if (!this._optionalContentConfigPromise) {
|
||||
console.error("optionalContentConfigPromise: Not initialized yet.");
|
||||
// Prevent issues if the getter is accessed *before* the `onePageRendered`
|
||||
// promise has resolved; won't (normally) happen in the default viewer.
|
||||
return this.pdfDocument.getOptionalContentConfig();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue