Skip to content

Commit

Permalink
LatteExtension: fixed debug panel for custom templates
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed May 18, 2021
1 parent 5b3d302 commit 3f474b4
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 @@ -102,7 +102,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) {
$control = $template->control ?? null;
$control = $template->getLatte()->getProviders()['uiControl'] ?? null;
if ($all || $control instanceof Nette\Application\UI\Presenter) {
$bar->addPanel(new Latte\Bridges\Tracy\LattePanel(
$template->getLatte(),
Expand Down

0 comments on commit 3f474b4

Please sign in to comment.