Never throw on `sample`
This commit is contained in:
		
							parent
							
								
									607ab66707
								
							
						
					
					
						commit
						2eb8469936
					
				|  | @ -312,7 +312,7 @@ module Jekyll | ||||||
| 
 | 
 | ||||||
|     def sample(input, num = 1) |     def sample(input, num = 1) | ||||||
|       return input unless input.respond_to?(:sample) |       return input unless input.respond_to?(:sample) | ||||||
|       num = Liquid::Utils.to_integer(num) |       num = Liquid::Utils.to_integer(num) rescue 1 | ||||||
|       if num == 1 |       if num == 1 | ||||||
|         input.sample |         input.sample | ||||||
|       else |       else | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue