From 495d279b34e46a1d63dc018fd833e171d16e4200 Mon Sep 17 00:00:00 2001 From: dmydry Date: Fri, 7 Sep 2018 09:34:27 +0200 Subject: [PATCH] Add an extra check for an e.target.className.indexOf function (#1210) * 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 --- source/vendor/detectElementResize.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/vendor/detectElementResize.js b/source/vendor/detectElementResize.js index da3a0b2ee..5a0ec6395 100644 --- a/source/vendor/detectElementResize.js +++ b/source/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 ) {