@ -486,7 +486,7 @@ class TwigExtension extends AbstractExtension {
$build['content']['#cache']['contexts'][] = 'url';
}
if ($wrapper && !Element::isEmpty($build['content'])) {
if ($wrapper && is_array($build['content']) && !Element::isEmpty($build['content'])) {
$build += [
'#theme' => 'block',
'#id' => $configuration['id'] ?? NULL,