Skip to content

Commit 7427091

Browse files
committed
fix InputNode parsing for control parts
1 parent ec07cdf commit 7427091

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/LatteTags/InputNode.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ public function print(PrintContext $context): string
2222
{
2323
$class = static::class;
2424
return $context->format(
25-
($this->name instanceof StringNode
26-
? '$ʟ_input = end($this->global->formsStack)[%node]; echo ' . $class . '::input($ʟ_input->'
27-
: '$ʟ_input = is_object($ʟ_tmp = %node) ? $ʟ_tmp : end($this->global->formsStack)[$ʟ_tmp]; echo ' . $class . '::input($ʟ_input->')
25+
'$ʟ_input = Nette\Bridges\FormsLatte\Runtime::item(%node, $this->global);'
26+
. 'echo ' . $class . '::input($ʟ_input->'
2827
. ($this->part ? ('getControlPart(%node)') : 'getControl()')
2928
. ($this->attributes->items ? '->addAttributes(%2.node)' : '')
30-
. ' %3.line, $ʟ_input, %1.dump);',
29+
. ' , $ʟ_input, %3.dump) %4.line;',
3130
$this->name,
32-
$this->part !== null,
31+
$this->part,
3332
$this->attributes,
33+
$this->part != null,
3434
$this->position,
3535
);
3636
}

0 commit comments

Comments
 (0)