Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

core: fix crash when exporting note with task list

Abdullah Atta0cca9e1ff85b
diff --git a/packages/core/content-types/tiptap.js b/packages/core/content-types/tiptap.js
index 5029f0927..6a31c61b4 100644
--- a/packages/core/content-types/tiptap.js
+++ b/packages/core/content-types/tiptap.js
@@ -56,7 +56,9 @@ export class Tiptap {
formatters: {
taskList: (elem, walk, builder, formatOptions) => {
return formatList(elem, walk, builder, formatOptions, (elem) => {
- return elem.attribs.class.includes("checked") ? " ✅ " : " ☐ ";
+ return elem.attribs.class && elem.attribs.class.includes("checked")
+ ? " ✅ "
+ : " ☐ ";
});
},
paragraph: (elem, walk, builder) => {