mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core: fix when tsdoc doesn't exist
This commit is contained in:
1 parent
c5f9f86dd7
commit
b8c67114e1
3 files changed
+6
-3
No files matched your search
@@ -245,7 +245,7 @@ export async function getVnode(domainId: string, type: number, id: string, uid?:
|
||||
if (!tdoc) throw new DiscussionNodeNotFoundError(id);
|
||||
if (uid) {
|
||||
const tsdoc = await model.getStatus(domainId, _id, uid);
|
||||
tdoc.attend = tsdoc.attend || tsdoc.enroll;
|
||||
tdoc.attend = tsdoc?.attend || tsdoc?.enroll;
|
||||
}
|
||||
return { ...tdoc, type, id };
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user