iOS: avoid crash because of null eventTarget

Summary: We were supposed to pass in proper eventEmitter, but passed in one with null eventTarget instead, causing assertion failures when dispatching event.

Reviewed By: sebmarkbage, shergin

Differential Revision: D8720793

fbshipit-source-id: 891f3b2a2c76a6dd3e40039623c6e86991aad50b
This commit is contained in:
Kevin Gozali 2018-07-02 17:23:48 -07:00 committed by Facebook Github Bot
parent 18d3648fa8
commit a09c464585
1 changed files with 4 additions and 4 deletions

View File

@ -166,7 +166,7 @@ SharedShadowNode FabricUIManager::cloneNode(const SharedShadowNode &shadowNode)
componentDescriptor->cloneShadowNode(
shadowNode,
nullptr,
componentDescriptor->createEventEmitter(nullptr /*TODO(shergin)*/, shadowNode->getTag()),
shadowNode->getEventEmitter(),
nullptr
);
@ -183,7 +183,7 @@ SharedShadowNode FabricUIManager::cloneNodeWithNewChildren(const SharedShadowNod
componentDescriptor->cloneShadowNode(
shadowNode,
nullptr,
componentDescriptor->createEventEmitter(nullptr /*TODO(shergin)*/, shadowNode->getTag()),
shadowNode->getEventEmitter(),
ShadowNode::emptySharedShadowNodeSharedList()
);
@ -201,7 +201,7 @@ SharedShadowNode FabricUIManager::cloneNodeWithNewProps(const SharedShadowNode &
componentDescriptor->cloneShadowNode(
shadowNode,
componentDescriptor->cloneProps(shadowNode->getProps(), rawProps),
componentDescriptor->createEventEmitter(nullptr /*TODO(shergin)*/, shadowNode->getTag()),
shadowNode->getEventEmitter(),
nullptr
);
@ -219,7 +219,7 @@ SharedShadowNode FabricUIManager::cloneNodeWithNewChildrenAndProps(const SharedS
componentDescriptor->cloneShadowNode(
shadowNode,
componentDescriptor->cloneProps(shadowNode->getProps(), rawProps),
componentDescriptor->createEventEmitter(nullptr /*TODO(shergin)*/, shadowNode->getTag()),
shadowNode->getEventEmitter(),
ShadowNode::emptySharedShadowNodeSharedList()
);