mirror of
https://github.com/OMGeeky/pytiled_parser.git
synced 2025-12-28 15:22:28 +01:00
fix(layer): encoding key is not required
This commit is contained in:
@@ -303,7 +303,8 @@ def _cast_tile_layer(raw_layer: RawLayer) -> TileLayer:
|
||||
"""
|
||||
tile_layer = TileLayer(**_get_common_attributes(raw_layer).__dict__)
|
||||
|
||||
tile_layer.encoding = raw_layer["encoding"]
|
||||
if raw_layer.get("encoding") is not None:
|
||||
tile_layer.encoding = raw_layer["encoding"]
|
||||
|
||||
if raw_layer.get("compression") is not None:
|
||||
tile_layer.compression = raw_layer["compression"]
|
||||
|
||||
Reference in New Issue
Block a user