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 #402
  • Loading branch information
mmistakes committed Jul 20, 2016
1 parent 9a9cbc0 commit 2d818cc
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 2d818cc

Please sign in to comment.