From a8fa68914a40ca585e2b2a84e17aefff896663a5 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Thu, 21 May 2020 17:53:19 +0300 Subject: [PATCH] vm: allow to convert Map item to bool --- pkg/vm/stack.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/vm/stack.go b/pkg/vm/stack.go index fc41a0406..8ad86d6aa 100644 --- a/pkg/vm/stack.go +++ b/pkg/vm/stack.go @@ -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 {