Merge pull request #12388 from jsg2021/patch-1
Refactor the container/viewer checks in the BaseViewer constructor
This commit is contained in:
commit
802b4c0850
@ -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…
x
Reference in New Issue
Block a user