Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(router): Ensure routes are processed in priority order and only i… #38780

Closed
wants to merge 1 commit into from

Commits on Sep 9, 2020

  1. fix(router): Ensure routes are processed in priority order and only i…

    …f needed
    
    There is a slight difference between `map`...`concatAll` and `concatMap`
    in that the latter (`concatMap`) will ensure that the computations are
    executed in-order and only if needed while the former may execute the
    `map` body of all items if they do not emit immediately. That is, if the stream
    is
    `from([a, b, c]).pipe(map(v => of(v).pipe(delay(1))), concatAll(), first())`
    the `map` body will execute for all of `a`, `b`, and `c`.
    However, the following will only execute the `concatMap` body for `a`
    `from([a, b, c]).pipe(concatMap(v => of(v).pipe(delay(1))), first())`
    
    See https://stackblitz.com/edit/rxjs-cvwxyx
    
    fixes angular#38691
    atscott committed Sep 9, 2020
    Copy the full SHA
    f3d9e46 View commit details
    Browse the repository at this point in the history