fix parsing if statements without braces (#1175)

This commit is contained in:
Michael Rawlings 2018-11-27 12:00:36 -08:00 committed by GitHub
parent 997b6aab65
commit 13ead29445
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 1 deletions

View File

@ -112,6 +112,10 @@ class Node {
return array;
}
if (!Array.isArray(array) && array instanceof Node) {
array = [array];
}
return new ArrayContainer(this, array);
}

View File

@ -62,6 +62,10 @@ function render(input, out, __component, component, state) {
let i = 10;
while (i--) marko_dynamicTag(input, {}, out, __component, "16")
if (z) {
marko_dynamicTag(renderD, {}, out, __component, "17");
}
}
marko_template._ = marko_renderer(render, {

View File

@ -29,4 +29,6 @@ $ for (let i = 0; i < 10; i++) {
$ let i = 10;
$ while (i--) {
input.renderBody(out);
}
}
$ if (z) renderD(out);