diff --git a/static/src/js/components/image-panel.js b/static/src/js/components/image-panel.js index 0efb895..53b42c8 100644 --- a/static/src/js/components/image-panel.js +++ b/static/src/js/components/image-panel.js @@ -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') + '")');