fixed arg validation
This commit is contained in:
@@ -53,7 +53,7 @@ func newExcerptModifier(args ...string) (*excerptModifier, error) {
|
||||
}
|
||||
|
||||
max := cast.ToInt(args[0])
|
||||
if max == 0 {
|
||||
if max <= 0 {
|
||||
return nil, errors.New("max argument must be > 0")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user