From b9ebc37c5b5b59b5eeaf897a4874cfa6df1edc75 Mon Sep 17 00:00:00 2001 From: Dominic Gannaway Date: Wed, 22 May 2019 21:04:28 +0100 Subject: [PATCH] Fix Flow (#15710) --- packages/react-events/src/Press.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/react-events/src/Press.js b/packages/react-events/src/Press.js index 8a2d3cc930..db86f553b3 100644 --- a/packages/react-events/src/Press.js +++ b/packages/react-events/src/Press.js @@ -438,10 +438,10 @@ function getAbsoluteBoundingClientRect( // Traverse through all offset nodes while (node != null) { const parent = node.parentNode; - const scrollTop = node.scrollTop; - const scrollLeft = node.scrollLeft; + const scrollTop = (node: any).scrollTop; + const scrollLeft = (node: any).scrollLeft; const isParentDocumentNode = - parent !== null && parent.nodeType === Node.DOCUMENT_NODE; + parent != null && parent.nodeType === Node.DOCUMENT_NODE; // Check if the current node is fixed position, by using // offsetParent node for a fast-path. Then we need to @@ -451,7 +451,7 @@ function getAbsoluteBoundingClientRect( // the document, then we can stop traversing the tree. if ( !isParentDocumentNode && - node.offsetParent === null && + (node: any).offsetParent === null && (scrollLeft !== 0 || scrollTop !== 0) ) { break;