Skip to content

Commit

Permalink
minor validation fix on d2map (#1868) (#1876)
Browse files Browse the repository at this point in the history
Co-authored-by: Redet Getachew <[email protected]>
  • Loading branch information
superskip and redet-G authored Oct 26, 2023
1 parent 070538b commit a365571
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion d2-tracker/dhis2.angular.directives.js
Original file line number Diff line number Diff line change
Expand Up @@ -1401,7 +1401,7 @@ var d2Directives = angular.module('d2Directives', [])
}

var coordinates = $scope.d2Object[$scope.id].slice(1,-1).split( ",");
if( !dhis2.validation.isNumber( coordinates[0] ) || !dhis2.validation.isNumber( coordinates[0] ) ){
if( !dhis2.validation.isNumber( coordinates[0] ) || !dhis2.validation.isNumber( coordinates[1] ) ){
NotificationService.showNotifcationDialog($translate.instant('error'), $translate.instant('invalid_coordinate_format') + ": " + $scope.d2Object[$scope.id] );
}
$scope.coordinateObject.coordinate = {latitude: parseFloat(coordinates[1]), longitude: parseFloat(coordinates[0])};
Expand Down

0 comments on commit a365571

Please sign in to comment.