Skip to content

Commit 04fc7c2

Browse files
committed
flush component state when done rendering
1 parent df0ede9 commit 04fc7c2

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/Illuminate/View/Concerns/ManagesComponents.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,4 +163,15 @@ protected function currentComponent()
163163
{
164164
return count($this->componentStack) - 1;
165165
}
166+
167+
/**
168+
* Flush all of the component state.
169+
*
170+
* @return void
171+
*/
172+
protected function flushComponents()
173+
{
174+
$this->componentStack = [];
175+
$this->componentData = [];
176+
}
166177
}

src/Illuminate/View/Factory.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,7 @@ public function flushState()
467467

468468
$this->flushSections();
469469
$this->flushStacks();
470+
$this->flushComponents();
470471
}
471472

472473
/**

0 commit comments

Comments
 (0)