Fixed crash on attempt to update local data of deallocated shadow node

Summary:
Trivial.
That's okay that sometimes shadowNodes and views hierarchies have lack of synchonization.

Reviewed By: sahrens

Differential Revision: D6040022

fbshipit-source-id: 6b49a82317b620b66a87441719fddcafb1f27934
This commit is contained in:
Valentin Shergin 2017-10-12 09:41:26 -07:00 committed by Facebook Github Bot
parent 452ac1b58e
commit f2c6877b91
1 changed files with 4 additions and 2 deletions

View File

@ -243,8 +243,10 @@ public class UIImplementation {
ReactShadowNode shadowNode = mShadowNodeRegistry.getNode(tag);
if (shadowNode == null) {
throw new IllegalViewOperationException(
"Trying to set local data for view with unknown tag: " + tag);
FLog.w(
ReactConstants.TAG,
"Attempt to set local data for view with unknown tag: " + tag);
return;
}
shadowNode.setLocalData(data);