Match-id-6bb47c987ac6a5af06a8bc3190968fa7f051b4b3
This commit is contained in:
parent
d4d0ae2743
commit
6ebd45102e
|
@ -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 (
|
||||
|
|
Loading…
Reference in New Issue