mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Extend MountingManager to not fail when trying to update event emitter of a non created view
Summary: This diff extends the MountingManager to not fail when trying to update event emitter of a non created view. This is necessary as intermediate step to remove virtual nodes out of the RN Fabric Android changelog: [internal] Reviewed By: JoshuaGross Differential Revision: D20048998 fbshipit-source-id: c2a3633400ac67c2f46ec52ed3ad80289ff6aeb9
This commit is contained in:
committed by
Facebook Github Bot
parent
8c10147ed5
commit
d42e2fa92a
@@ -445,7 +445,13 @@ public class MountingManager {
|
||||
@UiThread
|
||||
public void updateEventEmitter(int reactTag, @NonNull EventEmitterWrapper eventEmitter) {
|
||||
UiThreadUtil.assertOnUiThread();
|
||||
ViewState viewState = getViewState(reactTag);
|
||||
ViewState viewState = mTagToViewState.get(reactTag);
|
||||
if (viewState == null) {
|
||||
// TODO T62717437 - Use a flag to determine that these event emitters belong to virtual nodes
|
||||
// only.
|
||||
viewState = new ViewState(reactTag, null, null);
|
||||
mTagToViewState.put(reactTag, viewState);
|
||||
}
|
||||
viewState.mEventEmitter = eventEmitter;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user