Skip to content

Commit 08944b1

Browse files
authored
[6.x] Resolve Cascade content closure before checking content (#14502)
1 parent bf3fd39 commit 08944b1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/View/Cascade.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,14 @@ protected function hydrateGlobals()
154154

155155
protected function hydrateContent()
156156
{
157-
if (! $this->content) {
158-
return $this;
159-
}
160-
161157
if ($this->content instanceof \Closure) {
162158
$this->content = call_user_func($this->content);
163159
}
164160

161+
if (! $this->content) {
162+
return $this;
163+
}
164+
165165
$variables = $this->content instanceof Augmentable
166166
? $this->content->toDeferredAugmentedArray()
167167
: $this->content->toArray();

0 commit comments

Comments
 (0)