mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #12388 from jsg2021/patch-1
Refactor the container/viewer checks in the BaseViewer constructor
This commit is contained in:
commit
802b4c0850
1 changed files with 4 additions and 2 deletions
|
@ -150,8 +150,10 @@ class BaseViewer {
|
|||
) {
|
||||
if (
|
||||
!(
|
||||
this.container instanceof HTMLDivElement &&
|
||||
this.viewer instanceof HTMLDivElement
|
||||
this.container &&
|
||||
this.container.tagName.toUpperCase() === "DIV" &&
|
||||
this.viewer &&
|
||||
this.viewer.tagName.toUpperCase() === "DIV"
|
||||
)
|
||||
) {
|
||||
throw new Error("Invalid `container` and/or `viewer` option.");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue