From fa5368d2b13cfdfd6cf68fa0b7922d81634a0218 Mon Sep 17 00:00:00 2001 From: smart94423 Date: Fri, 18 Oct 2019 15:02:03 -0700 Subject: [PATCH] Add an extra check for an e.target.className.indexOf function Imported fix from bvaughn/react-virtualized#1210 --- src/vendor/detectElementResize.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vendor/detectElementResize.js b/src/vendor/detectElementResize.js index da3a0b2..5a0ec63 100644 --- a/src/vendor/detectElementResize.js +++ b/src/vendor/detectElementResize.js @@ -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 ) {