Skip to content

Commit

Permalink
Add an extra check for an e.target.className.indexOf function (#1210)
Browse files Browse the repository at this point in the history
* check if an e.target has a className with an indexOf function

* Delete detectElementResize_20180906173208.js

sorry, forgot to add vscode .history to .gitignore

* Delete detectElementResize_20180906173856.js

sorry, forgot to add vscode .history to .gitignore
  • Loading branch information
dmydry authored and wuweiweiwu committed Sep 7, 2018
1 parent 1762cee commit 495d279
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source/vendor/detectElementResize.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ export default function createDetectElementResize(nonce) {
var scrollListener = function(e) {
// Don't measure (which forces) reflow for scrolls that happen inside of children!
if (
e.target.className &&
typeof e.target.className.indexOf === 'function' &&
e.target.className.indexOf('contract-trigger') < 0 &&
e.target.className.indexOf('expand-trigger') < 0
) {
Expand Down

0 comments on commit 495d279

Please sign in to comment.