ohctechv3/.svn/pristine/65/65533761f531dbeab7ee4dc4e4907f0535594034.svn-base
2024-10-28 15:03:36 +05:30

14 lines
518 B
Plaintext

export default function HTMLElementType(props, propName, componentName, location, propFullName) {
if (process.env.NODE_ENV === 'production') {
return null;
}
var propValue = props[propName];
var safePropName = propFullName || propName;
if (propValue == null) {
return null;
}
if (propValue && propValue.nodeType !== 1) {
return new Error("Invalid ".concat(location, " `").concat(safePropName, "` supplied to `").concat(componentName, "`. ") + "Expected an HTMLElement.");
}
return null;
}