mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-09 15:57:26 +02:00
fixed arg validation
This commit is contained in:
1 parent
84c2c558da
commit
a6deb6ab90
2 files changed
+11
-1
No files matched your search
@@ -47,7 +47,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