Skip to content

Commit 76c855d

Browse files
committed
return to if statement for checking existence of addEventListener
1 parent b5deb4d commit 76c855d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib/events.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ var Events = {
6565
* https://github.com/d3/d3/issues/3035
6666
* https://github.com/plotly/plotly.js/issues/7452
6767
*/
68-
plotObj?.addEventListener?.("wheel", () => {});
68+
if(typeof plotObj.addEventListener === 'function') {
69+
plotObj.addEventListener("wheel", () => {});
70+
}
6971

7072
return plotObj;
7173
},

0 commit comments

Comments
 (0)