Skip to content

Commit

Permalink
Fix null access
Browse files Browse the repository at this point in the history
  • Loading branch information
Niiph committed Mar 28, 2024
1 parent d2d40f5 commit cacc71c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion templates/Shop/Product/_labels.html.twig
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<div class="p-labels">
{% set isNew = entityIsNew(product) %}
{% if isNew %}
{% include '@NiiphSyliusProductLabelPlugin/Common/_formatText.html.twig' with {'data': getNewLabel() } %}
{% set label = getNewLabel() %}
{% if label %}
{% include '@NiiphSyliusProductLabelPlugin/Common/_formatText.html.twig' with {'data': label} %}
{% endif %}
{% endif %}
{% for label in product.labels %}
{% include '@NiiphSyliusProductLabelPlugin/Common/_formatText.html.twig' with {'data': label} %}
Expand Down

0 comments on commit cacc71c

Please sign in to comment.