From 1d09c6e9c1416fbcd01905bc5f8ed5f8fe26677f Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Mon, 29 Jun 2015 09:37:40 -0700 Subject: [PATCH] Don't use ES5 array APIs --- src/compiler/emitter.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 451f32cc36b..32123c0a21f 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -71,7 +71,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) { else { // targetSourceFile is specified (e.g calling emitter from language service or calling getSemanticDiagnostic from language service) if (shouldEmitToOwnFile(targetSourceFile, compilerOptions)) { - let jsFilePath = getOwnEmitOutputFilePath(targetSourceFile, host, host.getSourceFiles().some(shouldEmitJsx) ? ".jsx" : ".js"); + let jsFilePath = getOwnEmitOutputFilePath(targetSourceFile, host, forEach(host.getSourceFiles(), shouldEmitJsx) ? ".jsx" : ".js"); emitFile(jsFilePath, targetSourceFile); } else if (!isDeclarationFile(targetSourceFile) && compilerOptions.out) { @@ -1170,7 +1170,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) { // Either emit one big object literal (no spread attribs), or // a call to React.__spread let attrs = openingNode.attributes; - if (attrs.some(attr => attr.kind === SyntaxKind.JsxSpreadAttribute)) { + if (forEach(attrs, attr => attr.kind === SyntaxKind.JsxSpreadAttribute)) { write("React.__spread("); let haveOpenedObjectLiteral = false;