From dd4f7e6c2bc307a7f0622d24d67f5a01b7871523 Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Tue, 12 Jan 2021 09:56:16 -0800 Subject: [PATCH] Fix detection of Fabric in ScrollViewStickyHeader Summary: Changelog: [internal] Revert a change introduced in https://github.com/facebook/react-native/pull/30333 where rickhanlonii asked it to be reverted as well. The change breaks sticky header in Fabric. Reviewed By: rubennorte Differential Revision: D25883861 fbshipit-source-id: b01305c6def390d0664c7be939ab3fc72186a07a --- Libraries/Components/ScrollView/ScrollViewStickyHeader.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Libraries/Components/ScrollView/ScrollViewStickyHeader.js b/Libraries/Components/ScrollView/ScrollViewStickyHeader.js index 76485c76af2081..172be92dfcab14 100644 --- a/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +++ b/Libraries/Components/ScrollView/ScrollViewStickyHeader.js @@ -179,9 +179,10 @@ class ScrollViewStickyHeader extends React.Component { render(): React.Node { // Fabric Detection - // eslint-disable-next-line dot-notation const isFabric = !!( - this._ref && this._ref['_internalInstanceHandle']?.stateNode?.canonical + // An internal transform mangles variables with leading "_" as private. + // eslint-disable-next-line dot-notation + (this._ref && this._ref['_internalInstanceHandle']?.stateNode?.canonical) ); // Initially and in the case of updated props or layout, we