diff --git a/box/box.py b/box/box.py index 158a55e..7af1cd4 100644 --- a/box/box.py +++ b/box/box.py @@ -415,7 +415,8 @@ def __contains__(self, item): except BoxError: return False else: - return children in self[first_item] + it = self[first_item] + return isinstance(it, Iterable) and children in it def keys(self, dotted: Union[bool] = False): if not dotted: