Skip to content

Commit

Permalink
fix(react-tinacms-inline): BlocksControlsProps#children is not optional
Browse files Browse the repository at this point in the history
  • Loading branch information
ncphillips committed Aug 10, 2020
1 parent 27e5eb7 commit 9ca8bc9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import { StyledFocusRing } from '../styles'
import { FocusRingOptions, getOffset, getOffsetX, getOffsetY } from '../styles'

export interface BlocksControlsProps {
children?: React.ReactChild
children: React.ReactChild
index: number
insetControls?: boolean
focusRing?: boolean | FocusRingOptions
Expand Down Expand Up @@ -74,7 +74,7 @@ export function BlocksControls({
const addAfterPosition = direction === 'horizontal' ? 'right' : 'bottom'

if (cms.disabled) {
return children
return children || null
}

const removeBlock = (event: any) => {
Expand Down

0 comments on commit 9ca8bc9

Please sign in to comment.