Index: pkg/dev_compiler/lib/src/js_ast/template.dart |
diff --git a/pkg/dev_compiler/lib/src/js_ast/template.dart b/pkg/dev_compiler/lib/src/js_ast/template.dart |
index 20fb6b62a7130d3361f6bbef911cc223c5952d97..5ecb89ef819a832c3a193274ee841910d92c121f 100644 |
--- a/pkg/dev_compiler/lib/src/js_ast/template.dart |
+++ b/pkg/dev_compiler/lib/src/js_ast/template.dart |
@@ -739,13 +739,9 @@ class InstantiatorGeneratorVisitor implements NodeVisitor<Instantiator> { |
(arguments) => new RegExpLiteral(node.pattern); |
Instantiator visitTemplateString(TemplateString node) { |
- Iterable makeElements = |
- node.elements.map((e) => e is String ? e : visit(e)); |
- return (arguments) { |
- return new TemplateString(makeElements |
- .map((m) => m is String ? m : m(arguments)) |
- .toList(growable: false)); |
- }; |
+ Iterable<Instantiator> makeElements = node.interpolations.map(visit); |
+ return (arguments) => new TemplateString(node.strings, |
+ makeElements.map((m) => m(arguments)).toList(growable: false)); |
} |
Instantiator visitTaggedTemplate(TaggedTemplate node) { |