@makeswift/runtime 0.11.0 → 0.11.2

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.
@@ -2175,7 +2175,9 @@ function richTextDTOtoSelection(data) {
2175
2175
  }
2176
2176
  function richTextDTOtoDAO(data) {
2177
2177
  var _a, _b, _c2;
2178
- return (_c2 = (_b = (_a = data.document) == null ? void 0 : _a.nodes) == null ? void 0 : _b.flatMap(toNodeDAO)) != null ? _c2 : [];
2178
+ return (_c2 = (_b = (_a = data.document) == null ? void 0 : _a.nodes) == null ? void 0 : _b.flatMap(toNodeDAO)) != null ? _c2 : [
2179
+ { type: BlockType.Default, children: [{ text: "" }] }
2180
+ ];
2179
2181
  }
2180
2182
  function toInlineOrTextDTO(node) {
2181
2183
  var _a;
@@ -3864,7 +3866,7 @@ function isRichTextV1Data(value) {
3864
3866
  return value !== void 0 && typeof value === "object" && !Array.isArray(value) && "document" in value;
3865
3867
  }
3866
3868
  function richTextV2DataToDescendents(data) {
3867
- return data.descendants;
3869
+ return data.descendants.length === 0 ? [{ type: BlockType.Default, children: [{ text: "" }] }] : data.descendants;
3868
3870
  }
3869
3871
  function richTextV2DescendentsToData(descendants, key) {
3870
3872
  return {