From fa34035defbf126f92e81dfe1b091b5d0755c537 Mon Sep 17 00:00:00 2001 From: Kevin Gozali Date: Tue, 21 Feb 2017 15:37:10 -0800 Subject: [PATCH] work around inspector redbox due to Fiber Summary: This temporarily fixes redbox when using Inspector before Fiber is fully ready. Reviewed By: sebmarkbage Differential Revision: D4593324 fbshipit-source-id: 287df97f5ecf30c15890f7f7bca4646421bb41c8 --- Libraries/Inspector/InspectorUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/Inspector/InspectorUtils.js b/Libraries/Inspector/InspectorUtils.js index afc146aec..ef43c2d04 100644 --- a/Libraries/Inspector/InspectorUtils.js +++ b/Libraries/Inspector/InspectorUtils.js @@ -21,7 +21,7 @@ function traverseOwnerTreeUp(hierarchy, instance) { function findInstanceByNativeTag(nativeTag) { var instance = ReactNativeComponentTree.getInstanceFromNode(nativeTag); - if (typeof instance.tag === 'number') { + if (!instance || typeof instance.tag === 'number') { // TODO(sema): We've disabled the inspector when using Fiber. Fix #15953531 return null; }