mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #13854 from Snuffleupagus/issue-13851
Prevent breaking errors when an optional content group is undefined (issue 13851)
This commit is contained in:
commit
85be62c684
3 changed files with 12 additions and 0 deletions
|
@ -95,6 +95,10 @@ class OptionalContentConfig {
|
|||
}
|
||||
|
||||
isVisible(group) {
|
||||
if (!group) {
|
||||
warn("Optional content group not defined.");
|
||||
return true;
|
||||
}
|
||||
if (group.type === "OCG") {
|
||||
if (!this._groups.has(group.id)) {
|
||||
warn(`Optional content group not found: ${group.id}`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue