fixes summit log author bug

This commit is contained in:
Christian Beutel
2024-12-04 22:53:11 +01:00
parent c42ca754df
commit 6a5783b2c5
2 changed files with 4 additions and 2 deletions

View File

@@ -25,7 +25,9 @@ export async function GET(event: RequestEvent) {
if (!log.expand) {
log.expand = {} as any
}
log.expand.author = await pb.collection("users_anonymous").getOne(log.author!);
if(log.author) {
log.expand.author = await pb.collection("users_anonymous").getOne(log.author);
}
}
return json(r)
} catch (e: any) {