1
Fork 0

Add validation

This commit is contained in:
Jake Howard 2016-04-21 18:58:59 +01:00
parent 349a3a1275
commit f02c9f3d08

View file

@ -1,6 +1,9 @@
export default function renderImagePanels() {
$('.image-panel').each(function () {
const element = $(this);
if (!element.data('image')) { // if it doesnt have an image, ignore it.
return;
}
element.css('background-image', 'url("' + element.data('image') + '")');