Default {bubbling,direct}EventTypes to {} in Native VCs
Summary: ## Rationale **Consistency with Static View Configs:** Static view config will default bubblingEventTypes or directEventTypesto to an empty object, if the any of them are undefined. https://www.internalfb.com/code/fbsource/[a73d46ab4052838e46e0f3aab8508025795aec1f]/xplat/js/react-native-github/Libraries/NativeComponent/ViewConfig.js?lines=20-23%2C26-33%2C41%2C43-50 Changelog: [Internal] Reviewed By: yungsters Differential Revision: D32159393 fbshipit-source-id: fefb3509b9b7c7374d2c3d8962afa5402daf6f72
This commit is contained in:
Родитель
274c617f5b
Коммит
36612a8060
|
@ -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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче