@makeswift/runtime 0.8.12 → 0.8.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1796,14 +1796,11 @@ function toNodeDAO(node) {
1796
1796
  case ObjectType.Text:
1797
1797
  return toInlineOrTextDAO(node);
1798
1798
  case ObjectType.Block:
1799
- if (node.nodes == null || node.nodes && node.nodes.length === 0) {
1800
- return [];
1801
- }
1802
1799
  return [
1803
1800
  {
1804
1801
  type: node.type,
1805
1802
  textAlign: (node == null ? void 0 : node.data) && "textAlign" in node.data ? node == null ? void 0 : node.data.textAlign : void 0,
1806
- children: node.nodes.flatMap(toNodeDAO)
1803
+ children: node.nodes == null || node.nodes && node.nodes.length === 0 ? [{ text: "" }] : node.nodes.flatMap(toNodeDAO)
1807
1804
  }
1808
1805
  ];
1809
1806
  default:
@@ -1883,6 +1880,11 @@ function toNodeDTO(node) {
1883
1880
  case BlockType.Heading1:
1884
1881
  case BlockType.Heading2:
1885
1882
  case BlockType.Heading3:
1883
+ case BlockType.Heading4:
1884
+ case BlockType.Heading5:
1885
+ case BlockType.Heading6:
1886
+ case BlockType.Default:
1887
+ case BlockType.Text:
1886
1888
  case BlockType.BlockQuote:
1887
1889
  case BlockType.Paragraph:
1888
1890
  case BlockType.OrderedList: