Never throw on `sample`

This commit is contained in:
Pat Hawks 2016-12-22 15:48:03 -06:00
parent 607ab66707
commit 2eb8469936
No known key found for this signature in database
GPG Key ID: F1746FF5F18B3D1B
1 changed files with 1 additions and 1 deletions

View File

@ -312,7 +312,7 @@ module Jekyll
def sample(input, num = 1)
return input unless input.respond_to?(:sample)
num = Liquid::Utils.to_integer(num)
num = Liquid::Utils.to_integer(num) rescue 1
if num == 1
input.sample
else