Skip to content

Commit

Permalink
Fix detection of Fabric in ScrollViewStickyHeader
Browse files Browse the repository at this point in the history
Summary:
Changelog: [internal]

Revert a change introduced in facebook#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
  • Loading branch information
sammy-SC authored and amgleitman committed Aug 19, 2021
1 parent 6698e2c commit dd4f7e6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Libraries/Components/ScrollView/ScrollViewStickyHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,10 @@ class ScrollViewStickyHeader extends React.Component<Props, State> {

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
Expand Down

0 comments on commit dd4f7e6

Please sign in to comment.