Answer the question
In order to leave comments, you need to log in
RangeError: Maximum call stack size exceeded in Observable?
Function in component:
public delete(event: IEvent): void {
this.confirm
.open({})
.pipe(
filter(Boolean),
concatMap(() => this.eventService.delete(event))
)
.subscribe((response) => this.eventService.next(response));
}
public next(events: IEvent[]): void {
this.events$.next(events);
}
public events(): Observable<any> {
return this.events$.asObservable();
}
public delete(event: IEvent): Observable<any> {
return this.eventsService
.delete(event)
.pipe(
concatMap(() =>
this.events$.pipe(
map((events: IEvent[]) =>
events.filter((e) => e.idEvent !== event.idEvent)
)
)
)
);
}
core.js:4002 ERROR RangeError: Maximum call stack size exceeded
at SafeSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.__tryOrUnsub (Subscriber.js:200)
at
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question