Skip to content

Commit

Permalink
[TM-848] fix for multipolygons validation
Browse files Browse the repository at this point in the history
  • Loading branch information
egrojMonroy committed Jun 7, 2024
1 parent 05e2777 commit 13fad19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Validators/Extensions/Polygons/FeatureBounds.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static function geoJsonValid($geojson): bool
return self::hasValidPolygonBounds(data_get($geojson, 'geometry.coordinates.0'));
} elseif ($type === 'MultiPolygon') {
foreach (data_get($geojson, 'geometry.coordinates') as $coordinates) {
if (! self::hasValidPolygonBounds($coordinates)) {
if (! self::hasValidPolygonBounds($coordinates[0])) {
return false;
}
}
Expand Down

0 comments on commit 13fad19

Please sign in to comment.