a tool for shared writing and social publishing
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

handle empty text blocks in copy

+3 -2
+3 -2
src/utils/getBlocksAsHTML.tsx
··· 30 30 ); 31 31 wrapper = "h" + headingLevel[0].data.value; 32 32 } 33 - let value = await scanIndex(tx).eav(b.entity, "block/text"); 33 + let value = (await scanIndex(tx).eav(b.entity, "block/text"))[0]; 34 + if (!value) return `<${wrapper || "p"}></${wrapper || "p"}>`; 34 35 let doc = new Y.Doc(); 35 - const update = base64.toByteArray(value[0].data.value); 36 + const update = base64.toByteArray(value.data.value); 36 37 Y.applyUpdate(doc, update); 37 38 let nodes = doc.getXmlElement("prosemirror").toArray(); 38 39 return renderToStaticMarkup(