Skip to content

Commit

Permalink
Bug don't show when params not set
Browse files Browse the repository at this point in the history
  • Loading branch information
thtmorais committed Mar 19, 2019
1 parent 711483b commit 0e1b995
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Pace.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 0e1b995

Please sign in to comment.