Re-add try/catch inside Agent's getIDForNode()
Brian Vaughn committed
Jul 28, 2019 at 08:42 UTC
8e2134beee2b174ea9cd16ba1d2f5d50aaea1ead
1 file changed
+8
-4
src/backend/agent.js
+8
-4
@@ -189,10 +189,14 @@ export default class Agent extends EventEmitter<{|
189
(rendererID: any)
190
]: any): RendererInterface);
191
192
- const id = renderer.getFiberIDForNative(node, true);
193
-
194
- if (id !== null) {
195
- return id;
192
+ try {
193
+ const id = renderer.getFiberIDForNative(node, true);
194
+ if (id !== null) {
195
+ return id;
196
+ }
197
+ } catch (error) {
198
+ // Some old React versions might throw if they can't find a match.
199
+ // If so we should ignore it...
200
}
201
}
202
return null;