Parcourir la source

Prevent from trying to set an unset background url

Johannes Zellner il y a 11 ans
Parent
commit
0f6916d40c
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      frontend/js/main.js

+ 2 - 2
frontend/js/main.js

@@ -43,8 +43,8 @@ var vue = new Vue({
 });
 
 Core.settings.onChanged(function (data) {
-    window.document.title = data.title;
-    window.document.body.style.backgroundImage = 'url("' + data.backgroundUrl + '")';
+    if (data.title) window.document.title = data.title;
+    if (data.backgroundUrl) window.document.body.style.backgroundImage = 'url("' + data.backgroundUrl + '")';
 });
 
 function hashChangeHandler() {