Skip to content

Commit 8751017

Browse files
fix: 🐛 ensure all required items exist
1 parent 0d8578f commit 8751017

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/cusy/cms/browser/overrides/collective.behavior.banner.browser.banner.pt

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
<tal:sources tal:repeat="scale python: ['banner_lg', 'banner_md', 'banner_sm', 'banner_xs']">
2222
<source srcset="" media=""
2323
tal:define="srcset python: scales.scale('banner_image', scale=scale);
24-
srcset_attribute python: srcset.srcset_attribute();
25-
src_url python: srcset_attribute or srcset.url;
24+
srcset_attribute python: srcset and srcset.srcset_attribute() or None;
25+
src_url python: srcset_attribute or (srcset and srcset.url or '');
2626
dimensions python: scales.available_sizes.get(scale);
2727
width python: dimensions and dimensions[0] or None;"
28-
tal:condition="src_url"
28+
tal:condition="python: srcset and src_url"
2929
tal:attributes="srcset src_url;
3030
media python: '(min-width: {0}px)'.format(width)">
3131
</tal:sources>

0 commit comments

Comments
 (0)