Skip to content
This repository was archived by the owner on Feb 18, 2026. It is now read-only.

Commit a0df9b2

Browse files
committed
Operations: Encapsulate individual success actions in a single ApiApplySuccessAction
1 parent c38bcaf commit a0df9b2

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/effects.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ export class NgrxJsonApiEffects implements OnDestroy {
518518
});
519519

520520
return this.jsonApi.operations({ operations: operations }).pipe(
521-
switchMap((result: { body: { operations: any[] } }): Action[] =>
521+
map((result: { body: { operations: any[] } }): Action[] =>
522522
_.zip(operations, result.body.operations).map(
523523
([operation, result]): Action => {
524524
const responsePayload: Payload = {
@@ -550,6 +550,7 @@ export class NgrxJsonApiEffects implements OnDestroy {
550550
}
551551
)
552552
),
553+
map(actions => new ApiApplySuccessAction(actions, action.zoneId)),
553554
catchError(error => {
554555
return of(
555556
new ApiApplyFailAction(

0 commit comments

Comments
 (0)