Skip to content

Commit

Permalink
Refactor ExtendedData class to handle empty elements list
Browse files Browse the repository at this point in the history
  • Loading branch information
cleder committed Dec 21, 2023
1 parent 7a26c65 commit dda94ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fastkml/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def __init__(
elements: Optional[Iterable[Union[Data, SchemaData]]] = None,
) -> None:
super().__init__(ns=ns, name_spaces=name_spaces)
self.elements = elements or []
self.elements = list(elements) if elements else []

def __bool__(self) -> bool:
return bool(self.elements)
Expand Down

0 comments on commit dda94ed

Please sign in to comment.