Add opportunities to search and fix a small bug (#6476)

This commit is contained in:
Félix Malfait
2024-07-31 16:50:16 +02:00
committed by GitHub
parent 80c0fc7ff1
commit ff74623dbb
2 changed files with 50 additions and 3 deletions

View File

@ -12,7 +12,7 @@ export const getFirstNonEmptyLineOfRichText = (
const contentArray = node.content as Array<{ text: string }>;
if (contentArray.length > 0) {
for (const content of contentArray) {
if (content.text.trim() !== '') {
if (content.text?.trim() !== '') {
return content.text;
}
}