diff --git a/frontend/components/BgWidget.php b/frontend/components/BgWidget.php
index bf78691..26a5ce5 100755
--- a/frontend/components/BgWidget.php
+++ b/frontend/components/BgWidget.php
@@ -22,9 +22,12 @@ class BgWidget extends Widget{
$this->bg = Bg::find()->orderBy('random()')->one();
}
- public function run(){
- return '
+ public function run(){
+ if(isset($this->bg) && !empty($this->bg)){
+ return '
';
+ }
+
}
}
?>
\ No newline at end of file
--
libgit2 0.21.4