From 5fb67b0fb21b0fa56106dad0bba8cca676451a4e Mon Sep 17 00:00:00 2001 From: Tianyu Yao Date: Fri, 11 Nov 2022 10:37:55 -0800 Subject: [PATCH] Fix checking pointer event feature flag Summary: Changelog: [Internal] The feature flag is a function not a boolean, flow didn't caught it.. Reviewed By: rbalicki2 Differential Revision: D41172775 fbshipit-source-id: b8a3365ab65049706b59e7e859f5f931ecab8360 --- Libraries/Inspector/DevtoolsOverlay.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Libraries/Inspector/DevtoolsOverlay.js b/Libraries/Inspector/DevtoolsOverlay.js index d1f08ff1fda..5cf03d3de0e 100644 --- a/Libraries/Inspector/DevtoolsOverlay.js +++ b/Libraries/Inspector/DevtoolsOverlay.js @@ -24,7 +24,6 @@ const getInspectorDataForViewAtPoint = require('./getInspectorDataForViewAtPoint const {useEffect, useState, useCallback, useRef} = React; const hook = window.__REACT_DEVTOOLS_GLOBAL_HOOK__; -const isFabric = global.nativeFabricUIManager != null; export default function DevtoolsOverlay({ inspectedView, @@ -182,7 +181,7 @@ export default function DevtoolsOverlay({ if (isInspecting) { const events = // Pointer events only work on fabric - isFabric && ReactNativeFeatureFlags.shouldEmitW3CPointerEvents + ReactNativeFeatureFlags.shouldEmitW3CPointerEvents() ? { onPointerMove, onPointerDown: onPointerMove,