Ensure conditions in IF ELSE queries are treated as booleans
This commit is contained in:
parent
d3fea6365f
commit
80f532436e
1 changed files with 2 additions and 2 deletions
|
@ -171,7 +171,7 @@ func (e *executor) fetch(ctx context.Context, val interface{}, doc *data.Doc) (o
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if chk, ok := ife.(bool); ok && chk {
|
||||
if calcAsBool(ife) {
|
||||
return e.fetch(ctx, val.Then[k], doc)
|
||||
}
|
||||
}
|
||||
|
@ -184,7 +184,7 @@ func (e *executor) fetch(ctx context.Context, val interface{}, doc *data.Doc) (o
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if chk, ok := ife.(bool); ok && chk {
|
||||
if calcAsBool(ife) {
|
||||
return e.fetch(ctx, val.Then[k], doc)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue