Skip to content

Commit 125d82e

Browse files
authored
Merge pull request #322 from HerrBertling/add-undefined-check
Add simple undefined check
2 parents 298c32b + 1c2a1ae commit 125d82e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/utils/documentToSimpleString.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// This function processes each individual node of the Rich Text document
2-
export function documentContentToSimpleString(nodes: any) {
2+
export function documentContentToSimpleString(nodes?: any) {
3+
if (nodes == undefined) return ''
34
// Initialize an empty string to hold the result
45
let result = "";
56

0 commit comments

Comments
 (0)