forked from extern/slate
silence errors when missing background images
This commit is contained in:
parent
81989acb95
commit
86b73ea291
@ -264,8 +264,8 @@ renderTiles();
|
|||||||
var getBackgroundImages = function() {
|
var getBackgroundImages = function() {
|
||||||
var backgrounds = document.getElementsByTagName("body");
|
var backgrounds = document.getElementsByTagName("body");
|
||||||
var images = [];
|
var images = [];
|
||||||
if (backgrounds.length > 0) {
|
var imgString = backgrounds[0].getAttribute("data-backgrounds");
|
||||||
var imgString = backgrounds[0].getAttribute("data-backgrounds");
|
if (imgString) {
|
||||||
images = imgString.split(/[\s,]+/).filter(Boolean);
|
images = imgString.split(/[\s,]+/).filter(Boolean);
|
||||||
}
|
}
|
||||||
return images;
|
return images;
|
||||||
|
@ -3465,8 +3465,8 @@ renderTiles();
|
|||||||
var getBackgroundImages = function() {
|
var getBackgroundImages = function() {
|
||||||
var backgrounds = document.getElementsByTagName("body");
|
var backgrounds = document.getElementsByTagName("body");
|
||||||
var images = [];
|
var images = [];
|
||||||
if (backgrounds.length > 0) {
|
var imgString = backgrounds[0].getAttribute("data-backgrounds");
|
||||||
var imgString = backgrounds[0].getAttribute("data-backgrounds");
|
if (imgString) {
|
||||||
images = imgString.split(/[\s,]+/).filter(Boolean);
|
images = imgString.split(/[\s,]+/).filter(Boolean);
|
||||||
}
|
}
|
||||||
return images;
|
return images;
|
||||||
|
Loading…
Reference in New Issue
Block a user