Skip to content

Commit

Permalink
[DevTools] Fix runtime error when inspecting an element times out (#2…
Browse files Browse the repository at this point in the history
  • Loading branch information
Juan authored Sep 15, 2021
1 parent e8feb11 commit a8cabb5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/react-devtools-shared/src/backendAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ function getPromiseForRequestID<T>(

const onTimeout = () => {
cleanup();
reject();
reject(
new Error(`Timed out waiting for event '${eventType}' from bridge`),
);
};

bridge.addListener(eventType, onInspectedElement);
Expand Down

0 comments on commit a8cabb5

Please sign in to comment.