Never throw on sample

This commit is contained in:
Pat Hawks
2016-12-22 15:48:03 -06:00
parent 607ab66707
commit 2eb8469936

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