Skip to content

Commit

Permalink
Evaluate twig expression of asset layer even if no entry was selected
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubjo committed Feb 7, 2022
1 parent 321e0f8 commit 55cec76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/models/AssetLayer.php
Expand Up @@ -46,7 +46,7 @@ public function willRender(array $vars)
$asset = null;
$entry = $vars['entry'] ?? null;

if ($this->expression !== null && $entry instanceof Entry) {
if ($this->expression !== null) {
$asset = $this->fetchAssetFromExpression($this->expression);
}

Expand Down

0 comments on commit 55cec76

Please sign in to comment.