Commit a69fa1bf by Qiang Xue

Do not render debug toolbar in ajax request.

parent b6cc8c00
...@@ -85,7 +85,7 @@ class Module extends \yii\base\Module ...@@ -85,7 +85,7 @@ class Module extends \yii\base\Module
public function renderToolbar($event) public function renderToolbar($event)
{ {
if (!$this->checkAccess()) { if (!$this->checkAccess() || Yii::$app->getRequest()->getIsAjax()) {
return; return;
} }
$url = Yii::$app->getUrlManager()->createUrl($this->id . '/default/toolbar', [ $url = Yii::$app->getUrlManager()->createUrl($this->id . '/default/toolbar', [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment