Add support to receive null payload in events

Reviewed By: shergin

Differential Revision: D8439118

fbshipit-source-id: a45da18765d58f6e32d34e2e57f3a6a64daccf71
This commit is contained in:
David Vacca 2018-06-17 11:41:10 -07:00 committed by Facebook Github Bot
parent a7e8e72c51
commit 936de607b1

View File

@ -639,6 +639,9 @@ public class FabricUIManager implements UIManager, JSHandler {
TAG,
"Dispatching event for target: " + eventTarget);
}
if (params == null) {
params = new WritableNativeMap();
}
mBinding.dispatchEventToTarget(mJSContext.get(), mEventHandlerPointer, eventTarget, name, (WritableNativeMap) params);
}