vm: allow to convert Map item to bool

This commit is contained in:
Evgenii Stratonikov 2020-05-21 17:53:19 +03:00
parent e07fd4f9f0
commit a8fa68914a

View file

@ -96,7 +96,7 @@ func (e *Element) TryBool() (bool, error) {
return t.value.Int64() != 0, nil
case *BoolItem:
return t.value, nil
case *ArrayItem, *StructItem:
case *ArrayItem, *StructItem, *MapItem:
return true, nil
case *ByteArrayItem:
for _, b := range t.value {