ruby-handlebars 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ruby-handlebars.rb +4 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 77a0f732e37dbb646fdd8cb2e40f60c835599458
4
- data.tar.gz: c3101acdbbd44eebfb429fce6386e7cf07879f8d
3
+ metadata.gz: 6ed8f17bdd377f5056cc1069ca285b73202f7c4c
4
+ data.tar.gz: e5989ea19b7c9a1b17ab34fdb9f36d772490e3b9
5
5
  SHA512:
6
- metadata.gz: e7538291ede843dffe379b6428eb5a89928632ecff051517eb1e892b2916c9af6cf83425a0a0d251506869cf7ed7e4a41f11cd3778de03e2171705f17ae1b522
7
- data.tar.gz: 3b2873ef1dd914f2cc52d5590ab2e96c5182a3d7f30e752bfa55c732418aa08e14f2588455458ee2b6d0010b5fc0c24e84ab304fb9e53923b3e500e6bb7bf58e
6
+ metadata.gz: 3a4bbee6e34790662483575d504997614ad8c9cc73b5b699ea48d9e0de6d9f31ac10836c92574ac454fc53bbe6ce63a6a52ec4396c5cb50bef1d5f0983f653b6
7
+ data.tar.gz: 77ad95bf4be3647cce456a217260e73c03433bc1e82453ec72eb5d42a4ecfef7b8e5bb358979cea37b9a91d30eb12930d17c5b4258c660fb7e678d9e0cb078f0
@@ -69,8 +69,10 @@ module Handlebars
69
69
  register_helper('each') do |context, items, block, else_block|
70
70
  current_this = context.get('this')
71
71
 
72
- if (items.nil? || items.empty?) && else_block
73
- result = else_block.fn(context)
72
+ if (items.nil? || items.empty?)
73
+ if else_block
74
+ result = else_block.fn(context)
75
+ end
74
76
  else
75
77
  result = items.map do |item|
76
78
  context.add_item(:this, item)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-handlebars
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vincent Pretre