Match-id-6bb47c987ac6a5af06a8bc3190968fa7f051b4b3

This commit is contained in:
* 2022-02-19 16:02:34 +08:00 committed by *
parent d4d0ae2743
commit 6ebd45102e
1 changed files with 4 additions and 4 deletions

View File

@ -123,11 +123,11 @@ export function getPropChangeList(
}
export function isTextChild(type: string, props: Props): boolean {
const typeArray = ['textarea', 'option', 'noscript'];
const typeOfPropsChild = ['string', 'number'];
if (typeArray.indexOf(type) >= 0) {
if (type === 'textarea' || type === 'option' || type === 'noscript') {
return true;
} else if (typeOfPropsChild.indexOf(typeof props.children) >= 0) {
}
const childType = typeof props.children;
if (childType === 'string' || childType === 'number') {
return true;
} else {
return (