Skip to content

Commit

Permalink
Merge pull request #12388 from jsg2021/patch-1
Browse files Browse the repository at this point in the history
Refactor the container/viewer checks in the BaseViewer constructor
  • Loading branch information
timvandermeij authored Sep 17, 2020
2 parents 558d387 + d37a445 commit 802b4c0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions web/base_viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
Expand Down

0 comments on commit 802b4c0

Please sign in to comment.