From 0e1b9956a8b4f0a9d898f46d0c279f0414468a4d Mon Sep 17 00:00:00 2001 From: Matheus Evangelista Morais Date: Mon, 18 Mar 2019 21:40:39 -0300 Subject: [PATCH] Bug don't show when params not set --- Pace.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Pace.php b/Pace.php index 4109a9a..d54b742 100644 --- a/Pace.php +++ b/Pace.php @@ -40,11 +40,13 @@ public function run() }elseif ($this->color === null){ $this->color = 'blue'; } + if(isset(Yii::$app->params['paceOptions']['theme']) && !empty(Yii::$app->params['paceOptions']['theme']) && $this->theme === null) { $this->theme = Yii::$app->params['paceOptions']['theme']; - }elseif ($this->color === null){ + }elseif ($this->theme === null){ $this->theme = 'minimal'; } + if(isset(Yii::$app->params['paceOptions']['options']) && !empty(Yii::$app->params['paceOptions']['options']) && $this->options === null) { $this->getView()->registerJs('window.paceOptions=' . json_encode(Yii::$app->params['paceOptions']['options']), \yii\web\View::POS_BEGIN); }