Skip to content

Commit 753fe0e

Browse files
Update system/View/ViewDecoratorTrait.php
Co-authored-by: MGatner <[email protected]>
1 parent 67f8876 commit 753fe0e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

system/View/ViewDecoratorTrait.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ trait ViewDecoratorTrait
2121
*/
2222
protected function decorateOutput(string $html): string
2323
{
24-
foreach ($this->config->decorators as $decorator) {
24+
$decorators = $this->config->decorators ?? \config(ViewConfig::class)->decorators;
25+
26+
foreach ($decorators as $decorator) {
2527
if (! is_subclass_of($decorator, ViewDecoratorInterface::class)) {
2628
throw ViewException::forInvalidDecorator($decorator);
2729
}

0 commit comments

Comments
 (0)