Skip to content

Commit

Permalink
fix: display empty doc as empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
gbicou committed Apr 12, 2023
1 parent 11cc693 commit 39a6a79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tiptap-display.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const props = withDefaults(
);
function getText(json: JSONContent): string {
return json.text ?? json.content?.map(getText).join("").trim() + "\n";
return json.text ?? (json.content?.map(getText).join("").trim() ?? "") + "\n";
}
const text = computed(() => {
Expand Down

0 comments on commit 39a6a79

Please sign in to comment.