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 #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 facebook-github-bot committed Jan 12, 2021
1 parent f2c6279 commit c42a59a
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 @@ -175,9 +175,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 c42a59a

Please sign in to comment.