Skip to content

Commit

Permalink
IBX-7983: Handled previewing ezimage field with height of 0
Browse files Browse the repository at this point in the history
  • Loading branch information
barw4 committed Mar 26, 2024
1 parent 80eeb14 commit 11a8406
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -433,10 +433,12 @@
<td>{{ 'ezimage.master_dimensions'|trans|desc('Master dimensions') }}:</td>
<td>{{ 'ezimage.width_and_height'|trans({'%width%': field.value.width, '%height%': field.value.height})|desc('Width: %width%px height: %height%px') }}</td>
</tr>
<tr class="ez-field-preview__meta-value-row">
<td>{{ 'ezimage.ratio'|trans|desc('Ratio') }}:</td>
<td>{{ (field.value.width/field.value.height)|round(2) }}</td>
</tr>
{% if (field.value.height is not same as '0') %}
<tr class="ez-field-preview__meta-value-row">
<td>{{ 'ezimage.ratio'|trans|desc('Ratio') }}:</td>
<td>{{ (field.value.width/field.value.height)|round(2) }}</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
Expand Down

0 comments on commit 11a8406

Please sign in to comment.