Skip to content

Commit 533c37d

Browse files
committed
minor #42010 Improve usage of twig ternary (Seb33300)
This PR was merged into the 4.4 branch. Discussion ---------- Improve usage of twig ternary | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | none | License | MIT | Doc PR | none Remove useless `else` condition when using twig ternary: > `{{ foo ? 'yes' }}` is the same as `{{ foo ? 'yes' : '' }}` See: https://twig.symfony.com/doc/3.x/templates.html#other-operators Commits ------- 4be962d323 Improve usage of twig ternary
2 parents 18bbe2d + 9169b96 commit 533c37d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Resources/views/Form/form_table_layout.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
{%- endblock button_row -%}
2828

2929
{%- block hidden_row -%}
30-
{%- set style = row_attr.style is defined ? (row_attr.style ~ (row_attr.style|trim|last != ';' ? '; ')) : '' -%}
30+
{%- set style = row_attr.style is defined ? (row_attr.style ~ (row_attr.style|trim|last != ';' ? '; ')) -%}
3131
<tr{% with {attr: row_attr|merge({style: (style ~ ' display: none')|trim})} %}{{ block('attributes') }}{% endwith %}>
3232
<td colspan="2">
3333
{{- form_widget(form) -}}

0 commit comments

Comments
 (0)