diff --git a/Libraries/ReactNative/getNativeComponentAttributes.js b/Libraries/ReactNative/getNativeComponentAttributes.js index 6f2bd8a8ae2..1359c9901a8 100644 --- a/Libraries/ReactNative/getNativeComponentAttributes.js +++ b/Libraries/ReactNative/getNativeComponentAttributes.js @@ -35,6 +35,10 @@ function getNativeComponentAttributes(uiViewClassName: string): any { // native component that can be either avoided or simplified. let {baseModuleName, bubblingEventTypes, directEventTypes} = viewConfig; let nativeProps = viewConfig.NativeProps; + + bubblingEventTypes = bubblingEventTypes ?? {}; + directEventTypes = directEventTypes ?? {}; + while (baseModuleName) { const baseModule = UIManager.getViewManagerConfig(baseModuleName); if (!baseModule) {