remove unnecessary conversion type

This commit is contained in:
GRL 2021-07-02 14:45:27 +02:00
parent c5b5326480
commit 8644389d7e

View File

@ -1078,9 +1078,7 @@ ${escapedMessage}
if (layer.properties === undefined) { if (layer.properties === undefined) {
layer.properties = []; layer.properties = [];
} }
const property = (layer.properties as ITiledMapLayerProperty[]).find( const property = layer.properties.find((property) => property.name === propertyName);
(property) => property.name === propertyName
);
if (property === undefined) { if (property === undefined) {
layer.properties.push({ name: propertyName, type: typeof propertyValue, value: propertyValue }); layer.properties.push({ name: propertyName, type: typeof propertyValue, value: propertyValue });
return; return;