@makeswift/runtime 0.11.0 → 0.11.1

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.
@@ -2167,7 +2167,9 @@ function richTextDTOtoSelection(data) {
2167
2167
  }
2168
2168
  function richTextDTOtoDAO(data) {
2169
2169
  var _a, _b, _c2;
2170
- return (_c2 = (_b = (_a = data.document) == null ? void 0 : _a.nodes) == null ? void 0 : _b.flatMap(toNodeDAO)) != null ? _c2 : [];
2170
+ return (_c2 = (_b = (_a = data.document) == null ? void 0 : _a.nodes) == null ? void 0 : _b.flatMap(toNodeDAO)) != null ? _c2 : [
2171
+ { type: BlockType.Default, children: [{ text: "" }] }
2172
+ ];
2171
2173
  }
2172
2174
  function toInlineOrTextDTO(node) {
2173
2175
  var _a;
@@ -3856,7 +3858,7 @@ function isRichTextV1Data(value) {
3856
3858
  return value !== void 0 && typeof value === "object" && !Array.isArray(value) && "document" in value;
3857
3859
  }
3858
3860
  function richTextV2DataToDescendents(data) {
3859
- return data.descendants;
3861
+ return data.descendants.length === 0 ? [{ type: BlockType.Default, children: [{ text: "" }] }] : data.descendants;
3860
3862
  }
3861
3863
  function richTextV2DescendentsToData(descendants, key) {
3862
3864
  return {