Skip to content

Commit

Permalink
Avoid redboxes when highlighting
Browse files Browse the repository at this point in the history
Summary:
Changelog:
[General][Fixed] - Fixed React DevTools element highlighting throwing redbox errors

Reviewed By: lunaruan

Differential Revision: D40367546

fbshipit-source-id: 094c4a512700f717efe06b7bfa304d94b6eed652
  • Loading branch information
tyao1 authored and facebook-github-bot committed Oct 18, 2022
1 parent 33e140f commit c64f25a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Libraries/Inspector/DevtoolsOverlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ export default function DevtoolsOverlay({
clearTimeout(hideTimeoutId);
// Shape of `node` is different in Fabric.
const component = node.canonical ?? node;
if (!component) {
return;
}

component.measure((x, y, width, height, left, top) => {
setInspected({
Expand Down

0 comments on commit c64f25a

Please sign in to comment.