Fix Flow (#15710)
Dominic Gannaway committed
May 22, 2019 at 21:04 UTC
b9ebc37c5b5b59b5eeaf897a4874cfa6df1edc75
1 file changed
+4
-4
packages/react-events/src/Press.js
+4
-4
@@ -438,10 +438,10 @@ function getAbsoluteBoundingClientRect(
438
// Traverse through all offset nodes
439
while (node != null) {
440
const parent = node.parentNode;
441
- const scrollTop = node.scrollTop;
442
- const scrollLeft = node.scrollLeft;
441
+ const scrollTop = (node: any).scrollTop;
442
+ const scrollLeft = (node: any).scrollLeft;
443
const isParentDocumentNode =
444
- parent !== null && parent.nodeType === Node.DOCUMENT_NODE;
444
+ parent != null && parent.nodeType === Node.DOCUMENT_NODE;
445
446
// Check if the current node is fixed position, by using
447
// offsetParent node for a fast-path. Then we need to
@@ -451,7 +451,7 @@ function getAbsoluteBoundingClientRect(
451
// the document, then we can stop traversing the tree.
452
if (
453
!isParentDocumentNode &&
454
- node.offsetParent === null &&
454
+ (node: any).offsetParent === null &&
455
(scrollLeft !== 0 || scrollTop !== 0)
456
) {
457
break;