Skip to content

Commit 1d09c6e

Browse files
committed
Don't use ES5 array APIs
1 parent 634d35a commit 1d09c6e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/compiler/emitter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
7171
else {
7272
// targetSourceFile is specified (e.g calling emitter from language service or calling getSemanticDiagnostic from language service)
7373
if (shouldEmitToOwnFile(targetSourceFile, compilerOptions)) {
74-
let jsFilePath = getOwnEmitOutputFilePath(targetSourceFile, host, host.getSourceFiles().some(shouldEmitJsx) ? ".jsx" : ".js");
74+
let jsFilePath = getOwnEmitOutputFilePath(targetSourceFile, host, forEach(host.getSourceFiles(), shouldEmitJsx) ? ".jsx" : ".js");
7575
emitFile(jsFilePath, targetSourceFile);
7676
}
7777
else if (!isDeclarationFile(targetSourceFile) && compilerOptions.out) {
@@ -1170,7 +1170,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
11701170
// Either emit one big object literal (no spread attribs), or
11711171
// a call to React.__spread
11721172
let attrs = openingNode.attributes;
1173-
if (attrs.some(attr => attr.kind === SyntaxKind.JsxSpreadAttribute)) {
1173+
if (forEach(attrs, attr => attr.kind === SyntaxKind.JsxSpreadAttribute)) {
11741174
write("React.__spread(");
11751175

11761176
let haveOpenedObjectLiteral = false;

0 commit comments

Comments
 (0)