mirror of
https://github.com/zhigang1992/react.git
synced 2026-04-29 20:55:46 +08:00
style: fix warning from eslint
This commit is contained in:
@@ -3,7 +3,7 @@ import React, { ReactNode } from 'react'
|
||||
export const hasChild = (
|
||||
children: ReactNode | undefined,
|
||||
child: React.ElementType
|
||||
): Boolean => {
|
||||
): boolean => {
|
||||
const types = React.Children.map(children, item => {
|
||||
if (!React.isValidElement(item)) return null
|
||||
return item.type
|
||||
|
||||
Reference in New Issue
Block a user