сразу после того как пришел ответ на первый
                  
                  
                  Сделал сейчас вот так
                  
                  
                  
                  
                  
                  modalRef.onResult()
                  
                  
                      .pipe(
                  
                  
                          mergeMap((data) => {
                  
                  
                              if ( data === 'delete' ) {
                  
                  
                                  return this.gettingStartedService.hideGettingStarted();
                  
                  
                              }
                  
                  
                              return of (null);
                  
                  
                          }),
                  
                  
                          mergeMap( ( res ) => {
                  
                  
                              if (res) {
                  
                  
                                  return this.profileService.getProfile();
                  
                  
                              }
                  
                  
                              return of (null);
                  
                  
                          }),
                  
                  
                          takeUntil(this.unsubscribe)
                  
                  
                      )
                  
                  
                      .subscribe(
                  
                  
                          ( profile: ProfileInterface) => {
                  
                  
                              this.profileStore.profile$.next(profile);
                  
                  
                          }
                  
                  
                      );
                  
                  
                  
                  
                  
                  Пробовал через forkJoin , но там же ответ приходит не один за одним 
                  
                  
                  Как можно сделать код чище ?
                  
                  
                
switchMap после первого запроса
Обсуждают сегодня