Skip to content

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

core: handle case where headline is undefined

Abdullah Attaf88431ded4b8
diff --git a/packages/core/src/utils/title-format.js b/packages/core/src/utils/title-format.js
index 32b80f96d..4eaf842be 100644
--- a/packages/core/src/utils/title-format.js
+++ b/packages/core/src/utils/title-format.js
@@ -52,7 +52,7 @@ export function formatTitle(
.replace(NEWLINE_STRIP_REGEX, " ")
.replace(DATE_REGEX, date)
.replace(TIME_REGEX, time)
- .replace(HEADLINE_REGEX, headline)
+ .replace(HEADLINE_REGEX, headline || "")
.replace(TIMESTAMP_REGEX, timestamp)
.replace(COUNT_REGEX, totalNotes + 1);
}