empty expressions no more return error, now they return nil
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"strings"
|
||||
)
|
||||
|
||||
@@ -129,8 +128,8 @@ func (self *ast) eval(ctx ExprContext, preset bool) (result any, err error) {
|
||||
if err == nil {
|
||||
result, err = self.root.compute(ctx)
|
||||
}
|
||||
} else {
|
||||
err = errors.New("empty expression")
|
||||
// } else {
|
||||
// err = errors.New("empty expression")
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user