Skip to content
This repository was archived by the owner on Apr 4, 2019. It is now read-only.

Commit 065680b

Browse files
committed
Use array utils to support old IE
1 parent 86b6d48 commit 065680b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/htmlbars-compiler/lib/template-compiler.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import HydrationJavaScriptCompiler from './hydration-javascript-compiler';
55
import TemplateVisitor from "./template-visitor";
66
import { processOpcodes } from "./utils";
77
import { repeat } from "../htmlbars-util/quoting";
8+
import { map } from "../htmlbars-util/array-utils";
89

910
function TemplateCompiler(options) {
1011
this.options = options || {};
@@ -119,13 +120,13 @@ TemplateCompiler.prototype.endProgram = function(program, programDepth) {
119120
templateSignature += ', blockArguments';
120121
}
121122

122-
var statements = hydrationPrograms.statements.map(function(s) {
123+
var statements = map(hydrationPrograms.statements, function(s) {
123124
return indent+' '+JSON.stringify(s);
124125
}).join(",\n");
125126

126127
var locals = JSON.stringify(hydrationPrograms.locals);
127128

128-
var templates = this.childTemplates.map(function(_, index) {
129+
var templates = map(this.childTemplates, function(_, index) {
129130
return 'child' + index;
130131
}).join(', ');
131132

0 commit comments

Comments
 (0)