Skip to content

Commit 8780c3b

Browse files
committed
use conditional chaining instead of if statement
1 parent e6618c6 commit 8780c3b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/lib/events.js

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

7270
return plotObj;
7371
},

0 commit comments

Comments
 (0)