check active view can determined for getting debug bar component
This commit is contained in:
parent
d20aeeb661
commit
df1c58954f
@ -50,10 +50,14 @@ class ShopControl_DebugBar extends ShopControl_DebugBar_parent
|
||||
{
|
||||
if (!isAdmin()) {
|
||||
/** @var DebugBarComponent $debugBarComponent */
|
||||
$debugBarComponent = Registry::getConfig()->getActiveView()->getComponent(DebugBarComponent::class);
|
||||
echo $debugBarComponent->getRenderer()->renderHead();
|
||||
$debugBarComponent->addTimelineMessures();
|
||||
echo $debugBarComponent->getRenderer()->render();
|
||||
$activeView = Registry::getConfig()->getActiveView();
|
||||
if ($activeView &&
|
||||
$debugBarComponent = $activeView->getComponent(DebugBarComponent::class)
|
||||
) {
|
||||
echo $debugBarComponent->getRenderer()->renderHead();
|
||||
$debugBarComponent->addTimelineMessures();
|
||||
echo $debugBarComponent->getRenderer()->render();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user