mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Re-add try/catch inside Agent's getIDForNode()
This commit is contained in:
@@ -189,10 +189,14 @@ export default class Agent extends EventEmitter<{|
|
||||
(rendererID: any)
|
||||
]: any): RendererInterface);
|
||||
|
||||
const id = renderer.getFiberIDForNative(node, true);
|
||||
|
||||
if (id !== null) {
|
||||
return id;
|
||||
try {
|
||||
const id = renderer.getFiberIDForNative(node, true);
|
||||
if (id !== null) {
|
||||
return id;
|
||||
}
|
||||
} catch (error) {
|
||||
// Some old React versions might throw if they can't find a match.
|
||||
// If so we should ignore it...
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user