Skip to content

Commit

Permalink
Update system/View/ViewDecoratorTrait.php
Browse files Browse the repository at this point in the history
Co-authored-by: MGatner <[email protected]>
  • Loading branch information
mostafakhudair and MGatner authored Dec 13, 2023
1 parent 67f8876 commit 753fe0e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion system/View/ViewDecoratorTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ trait ViewDecoratorTrait
*/
protected function decorateOutput(string $html): string
{
foreach ($this->config->decorators as $decorator) {
$decorators = $this->config->decorators ?? \config(ViewConfig::class)->decorators;

foreach ($decorators as $decorator) {
if (! is_subclass_of($decorator, ViewDecoratorInterface::class)) {
throw ViewException::forInvalidDecorator($decorator);
}
Expand Down

0 comments on commit 753fe0e

Please sign in to comment.