@truto/truto-jsonata 1.0.1 → 1.0.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.
package/dist/main.cjs CHANGED
@@ -897,9 +897,9 @@ const $6c8155c4308ceae8$var$formatPlainText = (x)=>{
897
897
  const $6c8155c4308ceae8$var$convertNotionToMd = function(block, level = 1) {
898
898
  const n = "\n\n";
899
899
  const data = block[block.type];
900
- const plainText = data.rich_text ? data.rich_text.map($6c8155c4308ceae8$var$formatPlainText) : [];
900
+ const plainText = data.rich_text ? data?.rich_text.map($6c8155c4308ceae8$var$formatPlainText) : [];
901
901
  // @ts-ignore
902
- const caption = data.caption ? data.caption.map((x)=>x?.plain_text) : [];
902
+ const caption = data?.caption ? data.caption.map((x)=>x?.plain_text) : [];
903
903
  let childData = "";
904
904
  switch(block.type){
905
905
  case "bookmark":