diff --git a/ui/src/app/member/member.route.ts b/ui/src/app/member/member.route.ts index b288c8086..7717a3a05 100644 --- a/ui/src/app/member/member.route.ts +++ b/ui/src/app/member/member.route.ts @@ -9,18 +9,18 @@ import { MemberUpdateComponent } from './member-update.component' import { MemberDetailComponent } from './member-detail.component' import { MemberImportPopupComponent } from './member-import-dialog.component' -export const MemberResolver: ResolveFn = ( +export const MemberResolver: ResolveFn = ( route: ActivatedRouteSnapshot, state: RouterStateSnapshot, memberService: MemberService = inject(MemberService) -): Observable => { +): Observable => { if (route.paramMap.get('id')) { return memberService.find(route.paramMap.get('id')!).pipe( filter((member: IMember) => !!member), take(1) ) } else { - return of(null) + return of(new Member()) } }