Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WeightedSelector: Return nil when no elements available #6

Merged
merged 1 commit into from
Dec 18, 2013

Conversation

jwroblewski
Copy link
Contributor

Previously, exception was raised in this condition:

TypeError:
   no implicit conversion from nil to integer
 # ./lib/liquid/weighted_selector.rb:38:in `pick_one_with_index'

Previously, exception was raised in this condition:

    TypeError:
       no implicit conversion from nil to integer
     # ./lib/liquid/weighted_selector.rb:38:in `pick_one_with_index'
@hollow
Copy link
Contributor

hollow commented Dec 18, 2013

👍

jwroblewski added a commit that referenced this pull request Dec 18, 2013
WeightedSelector: Return nil when no elements available
@jwroblewski jwroblewski merged commit beef8ca into master Dec 18, 2013
@jwroblewski jwroblewski deleted the weighted_selector__empty_elements_fix branch December 18, 2013 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants