Skip to content

Commit

Permalink
Merge pull request #268 from wri/fix/TM-848-Admin-UI-Upload-polygons
Browse files Browse the repository at this point in the history
[TM-848] fix for multipolygons validation
  • Loading branch information
egrojMonroy authored Jun 11, 2024
2 parents 3eb6485 + 2bc02c6 commit fb5ee37
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 fb5ee37

Please sign in to comment.