Skip to content

Commit

Permalink
Fix gallery size bug
Browse files Browse the repository at this point in the history
-  Improperly evaluated size of gallery arrays as strings and not integers
- Close mmistakes#402
  • Loading branch information
jluccisano committed Feb 12, 2017
1 parent 2771df5 commit ba5a0a3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions _includes/gallery
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@
{% assign gallery = page.gallery %}
{% endif %}

{% capture gallery_size %}{{ gallery | size }}{% endcapture %}

{% if gallery_size == '2' %}
{% if gallery.size == 2 %}
{% assign gallery_layout = 'half' %}
{% elsif gallery_size >= '3' %}
{% elsif gallery.size >= 3 %}
{% assign gallery_layout = 'third' %}
{% else %}
{% assign gallery_layout = '' %}
Expand Down

0 comments on commit ba5a0a3

Please sign in to comment.