fix: real fix

This commit is contained in:
Artemy 2023-07-05 15:54:40 +03:00
parent 14a250323d
commit 4c340926bf
3 changed files with 7 additions and 5 deletions

View file

@ -43,12 +43,14 @@ for (country of layers) {
);
co_features.features = co_features.features.map((val) => {
if (val?.geometry?.type == "Polygon") {
if (val?.geometry?.type === "Polygon") {
val.properties = {};
} else if (val?.geometry?.type == "MultiPolygon") {
} else if (val?.geometry?.type === "MultiPolygon") {
console.error("Error: MultiPolygons are not allowed!");
process.exit(1);
}
return val;
});
fs.writeFileSync(