Assert root node isn't null in createView
Reviewed By: mdvacca Differential Revision: D7374406 fbshipit-source-id: 534e58e7867a9fa8e395abd587e2c808c9c7843d
This commit is contained in:
parent
0376baf4b3
commit
046d4cee8b
|
@ -276,6 +276,7 @@ public class UIImplementation {
|
||||||
public void createView(int tag, String className, int rootViewTag, ReadableMap props) {
|
public void createView(int tag, String className, int rootViewTag, ReadableMap props) {
|
||||||
ReactShadowNode cssNode = createShadowNode(className);
|
ReactShadowNode cssNode = createShadowNode(className);
|
||||||
ReactShadowNode rootNode = mShadowNodeRegistry.getNode(rootViewTag);
|
ReactShadowNode rootNode = mShadowNodeRegistry.getNode(rootViewTag);
|
||||||
|
Assertions.assertNotNull(rootNode, "Root node with tag " + rootViewTag + " doesn't exist");
|
||||||
cssNode.setReactTag(tag);
|
cssNode.setReactTag(tag);
|
||||||
cssNode.setViewClassName(className);
|
cssNode.setViewClassName(className);
|
||||||
cssNode.setRootNode(rootNode);
|
cssNode.setRootNode(rootNode);
|
||||||
|
|
Loading…
Reference in New Issue