Skip to content

Commit

Permalink
LatteExtension: undefined property fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Jan 25, 2021
1 parent 556322f commit 8c47faa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Bridges/ApplicationDI/LatteExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function beforeCompile()
public static function initLattePanel(ApplicationLatte\TemplateFactory $factory, Tracy\Bar $bar, bool $all = false)
{
$factory->onCreate[] = function (ApplicationLatte\Template $template) use ($bar, $all) {
if ($all || $template->control instanceof Nette\Application\UI\Presenter) {
if ($all || ($template->control ?? null) instanceof Nette\Application\UI\Presenter) {
$bar->addPanel(new Latte\Bridges\Tracy\LattePanel(
$template->getLatte(),
$all ? (new \ReflectionObject($template->control))->getShortName() : ''
Expand Down

0 comments on commit 8c47faa

Please sign in to comment.