fix: add comment about return value

This commit is contained in:
Christel Westerberg
2024-02-19 13:52:16 +01:00
parent fecf135a98
commit 5bd7b2e38d

View File

@@ -21,12 +21,14 @@ export function groupEmbedsByUid(embedsArray: Node<Embeds>[]) {
return embedsByUid return embedsByUid
} }
export function nodeChildrenToHtml( export function nodeChildrenToHtml(
nodes: RTENode[], nodes: RTENode[],
embeds: EmbedByUid, embeds: EmbedByUid,
fullRenderOptions: RenderOptions fullRenderOptions: RenderOptions
): any { ): any {
return nodes.map((node, i) => { return nodes.map((node, i) => {
// This function either returns a JSX element or null
return { return {
...nodeToHtml(node, embeds, fullRenderOptions), ...nodeToHtml(node, embeds, fullRenderOptions),
key: `child-rte-${i}`, key: `child-rte-${i}`,