I'm upgrading a huge Angular 12 project to Angular 13 and did many steps. Effects were also rewritten in a newer way such as
createEffect(() =>
instead of
@Effect
Unfortunately, the upgrade caused several effects to be broken. The fast fix to avoid errors and run the app was to apply { dispatch: false }
. Unfortunately, that was not a fix and it broke the logic. I've tried to fix each broken effect step by step. For one huge effect the error is:
which unexpectedly gets fixed by commenting
filter(...),
block , or another filter(...),
block, or tap(..)
in this large and long (many lines) Effect.
Are there limitations that I'm missing? Why is this error happening? Why it gets fixed by commenting simple pieces of this Effect?
As example, if I comment any of several filters in different places, as example this (params are renamed):
// filter(
// ([
// param1,
// param2,
// param3,
// param4,
// param5,
// param6,
// param7,
// param8,
// param9,
// param10,
// param11,
// param12
// ]) => !!param11.id
// ),
Adding any has helped:
createEffect((): any => this.actions$.pipe(