fix: when count is actually 0

This commit is contained in:
ThatOneCalculator 2023-03-19 00:13:30 -07:00
parent 681cefcda5
commit 2117977d88
No known key found for this signature in database
GPG Key ID: 8703CACD01000000
1 changed files with 2 additions and 2 deletions

View File

@ -488,8 +488,8 @@ export const UserRepository = db.getRepository(User).extend({
birthday: profile!.birthday, birthday: profile!.birthday,
lang: profile!.lang, lang: profile!.lang,
fields: profile!.fields, fields: profile!.fields,
followersCount: followersCount || '?', followersCount: followersCount || 0,
followingCount: followingCount || '?', followingCount: followingCount || 0,
notesCount: user.notesCount, notesCount: user.notesCount,
pinnedNoteIds: pins.map((pin) => pin.noteId), pinnedNoteIds: pins.map((pin) => pin.noteId),
pinnedNotes: Notes.packMany( pinnedNotes: Notes.packMany(