diff --git a/pytiled_parser/tiled_object.py b/pytiled_parser/tiled_object.py index d4d72e5..79f1747 100644 --- a/pytiled_parser/tiled_object.py +++ b/pytiled_parser/tiled_object.py @@ -281,9 +281,8 @@ def _cast_polygon(raw_tiled_object: RawTiledObject) -> Polygon: Polygon: The Polygon object created from the raw_tiled_object """ polygon = [] - if raw_tiled_object.get("polygon"): - for point in raw_tiled_object["polygon"]: - polygon.append(OrderedPair(point["x"], point["y"])) + for point in raw_tiled_object["polygon"]: + polygon.append(OrderedPair(point["x"], point["y"])) return Polygon(points=polygon, **_get_common_attributes(raw_tiled_object).__dict__)