1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Using nested rxjs iif operators not working as expected

Discussão em 'Angular' iniciado por Jnr, Março 4, 2025.

  1. Jnr

    Jnr Guest

    The following is just a section of the code, but should be enough.

    In this case the allocateEquipment gets called when eq is an empty array and dryRun is true.

    ...

    tap(a => console.log(a)), // logs [] length:0
    concatMap(eq =>
    iif(() => Array.isArray(eq) && eq.length > 0,
    iif(() => dryRun, of(eq), this.allocatEquipment(of(eq)))
    , EMPTY)
    )


    Expected to return EMPTY

    Continue reading...

Compartilhe esta Página