refactor(editor): set readonly (#9475)

This commit is contained in:
Saul-Mirone
2025-01-02 04:02:15 +00:00
parent d0983696c0
commit be387a6f33
17 changed files with 32 additions and 50 deletions

View File

@@ -188,7 +188,7 @@ async function renderNoteContent(
let parent: string | null = block;
while (parent && !ids.includes(parent)) {
ids.push(parent);
parent = doc.blockCollection.crud.getParent(parent);
parent = doc.getParent(parent)?.id ?? null;
}
});
const query: Query = {

View File

@@ -35,7 +35,7 @@ export class PreviewHelper {
if (!selectedIds.includes(parent)) {
ids.push({ viewType: BlockViewType.Bypass, id: parent });
}
parent = this.widget.doc.blockCollection.crud.getParent(parent);
parent = this.widget.doc.getParent(parent)?.id ?? null;
} while (parent && !ids.map(({ id }) => id).includes(parent));
});