From 2ff83324af8cbf8e896a8b140b8a2349b8636286 Mon Sep 17 00:00:00 2001 From: Vikram Subramanian Date: Mon, 11 Jul 2016 17:25:40 -0700 Subject: [PATCH] fix(core): Don't use ES6 spread operator when undefined is allowed. Workaround a closure bug where it doesn't produce the right code ES6 operator when the array value can be undefined. --- modules/@angular/core/src/linker/compiler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/@angular/core/src/linker/compiler.ts b/modules/@angular/core/src/linker/compiler.ts index 8171011039..004f83a306 100644 --- a/modules/@angular/core/src/linker/compiler.ts +++ b/modules/@angular/core/src/linker/compiler.ts @@ -145,6 +145,6 @@ function _firstDefined(...args: T[]): T { function _mergeArrays(...parts: any[][]): any[] { let result: any[] = []; - parts.forEach((part) => result.push(...part)); + parts.forEach((part) => result.push.apply(result, part)); return result; }