diff --git a/src/Compiler.php b/src/Compiler.php
index 1e7734b..538ac47 100644
--- a/src/Compiler.php
+++ b/src/Compiler.php
@@ -83,6 +83,8 @@ public function convert(): string
{
$templateElement = $this->document->getElementsByTagName('template')->item(0);
$scriptElement = $this->document->getElementsByTagName('script')->item(0);
+
+ /** @var \DOMNodeList $twigBlocks */
$twigBlocks = $this->document->getElementsByTagName('twig');
if ($scriptElement) {
@@ -340,7 +342,7 @@ private function handleAttributeBinding(DOMElement $node)
$dynamicValues[] = sprintf(
'{{ %s ? \'%s\' }}',
$this->builder->refactorCondition($matchElement['condition']),
- $matchElement['class']
+ $matchElement['class'] . ' '
);
}
}
diff --git a/tests/fixtures/vue-bind/bindings.twig b/tests/fixtures/vue-bind/bindings.twig
index f73cce8..1c69699 100644
--- a/tests/fixtures/vue-bind/bindings.twig
+++ b/tests/fixtures/vue-bind/bindings.twig
@@ -3,6 +3,6 @@