Error: In global-error-handler.ts file at line 42, a TypeError has occurred. It states: "You provided 'false' where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable."
Below is the snippet of code that triggered this error:
getPreloadPendingCountSuccess$ = createEffect(() =>
this.actions$.pipe(
ofType(fromActions.GetPreloadPendingCountSuccess),
switchMap(({ count, shouldUpdateMovements }) => {
return shouldUpdateMovements && count > 0 && [fromActions.GetPreloadPendingMovementsRequest()];
})
)
);
The issue seems to be related to the boolean parameter shouldUpdateMovements. The code works without it, but it is required for proper functioning. How can I resolve this problem? Thank you.