Add validation
This commit is contained in:
parent
349a3a1275
commit
f02c9f3d08
1 changed files with 3 additions and 0 deletions
|
@ -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') + '")');
|
||||
|
||||
|
|
Reference in a new issue