diff --git a/packages/react-native-codegen/src/generators/components/GeneratePropsH.js b/packages/react-native-codegen/src/generators/components/GeneratePropsH.js index bdbd5886294..6cb6ca5bc2b 100644 --- a/packages/react-native-codegen/src/generators/components/GeneratePropsH.js +++ b/packages/react-native-codegen/src/generators/components/GeneratePropsH.js @@ -187,6 +187,9 @@ static inline std::string toString(const ::_ENUM_MASK_:: &value) { `.trim(); function getClassExtendString(component): string { + if (component.extendsProps.length === 0) { + throw new Error('Invalid: component.extendsProps is empty'); + } const extendString = ' : ' + component.extendsProps