diff --git a/packages/router/src/utils/collection.ts b/packages/router/src/utils/collection.ts index 2be7ff2d263aa..dd1ccadebed00 100644 --- a/packages/router/src/utils/collection.ts +++ b/packages/router/src/utils/collection.ts @@ -84,7 +84,8 @@ export function waitForMap( } }); - return of (...waitHead, ...waitTail).pipe(concatAll(), lastValue(), map(() => res)); + // Closure compiler has problem with using spread operator here. So just using Array.concat. + return of .apply(null, waitHead.concat(waitTail)).pipe(concatAll(), lastValue(), map(() => res)); } /**