Browse Source

silence errors when missing background images

main
Gus Esquivel 8 years ago
parent
commit
86b73ea291
  1. 2
      src/js/slate.js
  2. 2
      static/js/slate.js

2
src/js/slate.js

@ -264,8 +264,8 @@ renderTiles();
var getBackgroundImages = function() {
var backgrounds = document.getElementsByTagName("body");
var images = [];
if (backgrounds.length > 0) {
var imgString = backgrounds[0].getAttribute("data-backgrounds");
if (imgString) {
images = imgString.split(/[\s,]+/).filter(Boolean);
}
return images;

2
static/js/slate.js

@ -3465,8 +3465,8 @@ renderTiles();
var getBackgroundImages = function() {
var backgrounds = document.getElementsByTagName("body");
var images = [];
if (backgrounds.length > 0) {
var imgString = backgrounds[0].getAttribute("data-backgrounds");
if (imgString) {
images = imgString.split(/[\s,]+/).filter(Boolean);
}
return images;

Loading…
Cancel
Save