- Fix: Only flush js config if not empty.

This commit is contained in:
buddh4 2017-02-22 17:00:11 +01:00
parent d0c38973e6
commit 08bda5c05e

View File

@ -265,8 +265,9 @@ class View extends \yii\web\View
*/
protected function flushJsConfig($key = null)
{
$this->registerJs("humhub.config.set(" . json_encode($this->jsConfig) . ");", View::POS_BEGIN, $key);
$this->jsConfig = [];
if(!empty($this->jsConfig)) {
$this->registerJs("humhub.config.set(" . json_encode($this->jsConfig) . ");", View::POS_BEGIN, $key);
$this->jsConfig = [];
}
}
}