Skip to content

Commit

Permalink
Add an extra check for an e.target.className.indexOf function
Browse files Browse the repository at this point in the history
  • Loading branch information
smart94423 committed Oct 18, 2019
1 parent 9113bdd commit fa5368d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/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 fa5368d

Please sign in to comment.