Skip to content

Commit

Permalink
validate theme setter
Browse files Browse the repository at this point in the history
  • Loading branch information
uyab committed Dec 26, 2019
1 parent e203024 commit c49e650
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Concerns/AttributeSetter.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ trait AttributeSetter
{
public function setTheme($theme)
{
if (!array_key_exists($theme, $this->themes)) {
return $this;
}

if (is_string($theme) || is_array($theme)) {
$this->theme = $theme;
}

$this->setRandomTheme();
$this->initTheme();

return $this;
}
Expand Down

0 comments on commit c49e650

Please sign in to comment.