diff --git a/src/app/features/moderation/mappers/preprint-moderation.mapper.ts b/src/app/features/moderation/mappers/preprint-moderation.mapper.ts index cf4500f0b..799671e2d 100644 --- a/src/app/features/moderation/mappers/preprint-moderation.mapper.ts +++ b/src/app/features/moderation/mappers/preprint-moderation.mapper.ts @@ -72,10 +72,10 @@ export class PreprintModerationMapper { })), totalCount: response.meta.total, pageSize: response.meta.per_page, - pendingCount: response.meta.reviews_state_counts.pending, - acceptedCount: response.meta.reviews_state_counts.accepted, - rejectedCount: response.meta.reviews_state_counts.rejected, - withdrawnCount: response.meta.reviews_state_counts.withdrawn, + pendingCount: response.meta?.reviews_state_counts?.pending || 0, + acceptedCount: response.meta?.reviews_state_counts?.accepted || 0, + rejectedCount: response.meta?.reviews_state_counts?.rejected || 0, + withdrawnCount: response.meta?.reviews_state_counts?.withdrawn || 0, }; } diff --git a/src/app/features/profile/components/profile-information/profile-information.component.html b/src/app/features/profile/components/profile-information/profile-information.component.html index e21756c3f..e03ceb58f 100644 --- a/src/app/features/profile/components/profile-information/profile-information.component.html +++ b/src/app/features/profile/components/profile-information/profile-information.component.html @@ -8,18 +8,9 @@
- {{ currentUser()?.employment?.[0]?.title }}, - {{ currentUser()?.employment?.[0]?.institution }} -
- } - -- {{ 'myProfile.memberSince' | translate }}: {{ currentUser()?.dateRegistered | date: 'MMM d, yyyy' }} -
-+ {{ 'myProfile.memberSince' | translate }}: {{ currentUser()?.dateRegistered | date: 'MMM d, yyyy' }} +