Skip to content

Commit 70fa47e

Browse files
committed
Fix handleSlots
1 parent 60404e8 commit 70fa47e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Compiler.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ public function convertNode(DOMNode $node, int $level = 0): DOMNode
310310
$this->handleHtml($node);
311311
$this->handleText($node);
312312
$this->stripEventHandlers($node);
313-
$this->handleSlots($node);
313+
$this->handleSlots($node, $level);
314314
$this->cleanupAttributes($node);
315315
$this->addScopedAttribute($node, $level);
316316
}
@@ -1345,15 +1345,15 @@ protected function createVariableBlock(): string
13451345
/**
13461346
* @throws Exception
13471347
*/
1348-
protected function handleSlots(DOMElement $node): void
1348+
protected function handleSlots(DOMElement $node, int $level): void
13491349
{
13501350
if ($node->nodeName !== 'slot') {
13511351
return;
13521352
}
13531353

13541354
if ($node->hasChildNodes()) {
13551355
foreach ($node->childNodes as $childNode) {
1356-
$this->convertNode($childNode);
1356+
$this->convertNode($childNode, $level + 1);
13571357
}
13581358
}
13591359

0 commit comments

Comments
 (0)