UNPKG

@udus/notion-renderer

Version:
19 lines (18 loc) 528 B
import { fetchBlockList } from "../fetchBlockList.js"; export const convertNumberedListItemResponseToBlock = async (block, client) => { if (block.has_children) { const { ok, data } = await fetchBlockList(client, { block_id: block.id }); if (ok) { return { ...block, numbered_list_item: { ...block.numbered_list_item, children: data, }, }; } } return { ...block, }; };