style: fix warning from eslint

This commit is contained in:
unix
2020-03-19 02:05:17 +08:00
parent 1b2365b89f
commit 596f134c25
22 changed files with 39 additions and 32 deletions

View File

@@ -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