mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
fix parsing if statements without braces (#1175)
This commit is contained in:
parent
997b6aab65
commit
13ead29445
@ -112,6 +112,10 @@ class Node {
|
||||
return array;
|
||||
}
|
||||
|
||||
if (!Array.isArray(array) && array instanceof Node) {
|
||||
array = [array];
|
||||
}
|
||||
|
||||
return new ArrayContainer(this, array);
|
||||
}
|
||||
|
||||
|
||||
@ -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, {
|
||||
|
||||
@ -29,4 +29,6 @@ $ for (let i = 0; i < 10; i++) {
|
||||
$ let i = 10;
|
||||
$ while (i--) {
|
||||
input.renderBody(out);
|
||||
}
|
||||
}
|
||||
|
||||
$ if (z) renderD(out);
|
||||
Loading…
x
Reference in New Issue
Block a user