fix(server): handle edge case of empty docs (#12608)

fix AI-130
This commit is contained in:
darkskygit
2025-05-28 11:25:53 +00:00
parent 9f0d4536c7
commit acf92aa3da
2 changed files with 4 additions and 2 deletions

View File

@@ -261,7 +261,7 @@ export class CopilotContextDocJob {
): Promise<DocFragment | null> {
const docContent = await this.doc.getFullDocContent(workspaceId, docId);
const authors = await this.models.doc.getAuthors(workspaceId, docId);
if (docContent?.summary && authors) {
if (docContent && authors) {
const { title = 'Untitled', summary } = docContent;
const { createdAt, updatedAt, createdByUser, updatedByUser } = authors;
return {