Index: lib/src/js/printer.dart |
diff --git a/lib/src/js/printer.dart b/lib/src/js/printer.dart |
index e07e37a7b16ccd84a4a4a3a034e6ba5305ece794..0e19d2f93a651a89704c415438625bac3fd47d41 100644 |
--- a/lib/src/js/printer.dart |
+++ b/lib/src/js/printer.dart |
@@ -781,7 +781,9 @@ class Printer implements NodeVisitor { |
visitSpread(Spread unary) => visitPrefix(unary); |
visitYield(Yield yield) { |
- out(yield.star ? "yield* " : "yield "); |
+ out(yield.star ? "yield*" : "yield"); |
+ if (yield.value == null) return; |
+ out(" "); |
visitNestedExpression(yield.value, yield.precedenceLevel, |
newInForInit: inForInit, newAtStatementBegin: false); |
} |