We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dcad500 commit 4216d69Copy full SHA for 4216d69
packages/richtext-slate/src/field/elements/li/ListItem.tsx
@@ -2,18 +2,14 @@
2
3
import type { Element } from 'slate'
4
5
-import React, { isValidElement } from 'react'
+import React from 'react'
6
7
import { useElement } from '../../providers/ElementProvider.js'
8
import { listTypes } from '../listTypes.js'
9
10
export const ListItemElement: React.FC = () => {
11
const { attributes, children, element } = useElement<Element>()
12
13
- if (!isValidElement(element)) {
14
- return null
15
- }
16
-
17
const listType = typeof element.children?.[0]?.type === 'string' ? element.children[0].type : ''
18
const disableListStyle = element.children.length >= 1 && listTypes.includes(listType)
19
0 commit comments