fix(export/share): tree error in prod

This commit is contained in:
Elian Doran 2025-06-24 18:49:19 +03:00
parent 6d446c5b27
commit 3ebfee8bd2
No known key found for this signature in database

View File

@ -88,8 +88,11 @@ export function renderNoteContent(note: SNote) {
const ancestors: string[] = [];
let notePointer = note;
while (notePointer.parents[0].noteId !== subRoot.note?.noteId) {
while (notePointer.parents[0]?.noteId !== subRoot.note?.noteId) {
const pointerParent = notePointer.parents[0];
if (!pointerParent) {
break;
}
ancestors.push(pointerParent.noteId);
notePointer = pointerParent;
}