File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -40,16 +40,22 @@ export const itemPageResolver: ResolveFn<RemoteData<Item>> = (
4040 store : Store < AppState > = inject ( Store < AppState > ) ,
4141 authService : AuthService = inject ( AuthService ) ,
4242) : Observable < RemoteData < Item > > => {
43- return itemService . findById (
43+ const itemRD$ = itemService . findById (
4444 route . params . id ,
4545 true ,
4646 false ,
4747 ...ITEM_PAGE_LINKS_TO_FOLLOW ,
4848 ) . pipe (
4949 getFirstCompletedRemoteData ( ) ,
5050 redirectOn4xx ( router , authService ) ,
51+ ) ;
52+
53+ itemRD$ . subscribe ( ( itemRD : RemoteData < Item > ) => {
54+ store . dispatch ( new ResolvedAction ( state . url , itemRD . payload ) ) ;
55+ } ) ;
56+
57+ return itemRD$ . pipe (
5158 map ( ( rd : RemoteData < Item > ) => {
52- store . dispatch ( new ResolvedAction ( state . url , rd . payload ) ) ;
5359 if ( rd . hasSucceeded && hasValue ( rd . payload ) ) {
5460 const thisRoute = state . url ;
5561
You can’t perform that action at this time.
0 commit comments