Skip to content

Commit

Permalink
Merge pull request #186 from svd-sea/master
Browse files Browse the repository at this point in the history
fix e.target.tagName is undefined error
  • Loading branch information
ivictbor authored Oct 19, 2023
2 parents fd4aa23 + 71f8139 commit 398412f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1012,8 +1012,9 @@ class PainterroProc {
];
const scale = this.getScale();
this.curCord = [this.curCord[0] * scale, this.curCord[1] * scale];
if (e.target.tagName.toLowerCase() !== 'input' && e.target.tagName.toLowerCase() !== 'button'
&& e.target.tagName.toLowerCase() !== 'i' && e.target.tagName.toLowerCase() !== 'select') {
if (typeof e.target.tagName !== "undefined" && e.target.tagName.toLowerCase() !== 'input'
&& e.target.tagName.toLowerCase() !== 'button' && e.target.tagName.toLowerCase() !== 'i'
&& e.target.tagName.toLowerCase() !== 'select') {
if (!this.zoomButtonActive) e.preventDefault();
}
}
Expand Down

0 comments on commit 398412f

Please sign in to comment.