@samitouri / QOS-React-2 / commits / a8cabb5648

[DevTools] Fix runtime error when inspecting an element times out (#22329)

Juan committed Sep 15, 2021 at 17:19 UTC a8cabb5648a14ef55cb96d679a526e3f731e9611
1 file changed +3 -1
packages/react-devtools-shared/src/backendAPI.js
+3 -1
@@ -158,7 +158,9 @@ function getPromiseForRequestID<T>(
158
159 const onTimeout = () => {
160 cleanup();
161 - reject();
161 + reject(
162 + new Error(`Timed out waiting for event '${eventType}' from bridge`),
163 + );
164 };
165
166 bridge.addListener(eventType, onInspectedElement);