mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-30 17:28:29 -05:00
Never throw on sample
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user