Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

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
makaroniame committed Jul 20, 2016
1 parent 24667e0 commit 12cc6d3
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 12cc6d3

Please sign in to comment.