From e6c731f79113a59b28fe28a4dd063ac399195b59 Mon Sep 17 00:00:00 2001 From: Vikram Subramanian Date: Tue, 20 Mar 2018 06:58:54 -0700 Subject: [PATCH] fix(router): don't use spread operator to workaround an issue in closure compiler (#22884) Closure compiler could not handle the spread operator in this one place. Working around it by removing the use of spread operator. PR Close #22884 --- packages/router/src/utils/collection.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/router/src/utils/collection.ts b/packages/router/src/utils/collection.ts index 2be7ff2d26..dd1ccadebe 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)); } /**