diff --git a/d2-tracker/dhis2.angular.directives.js b/d2-tracker/dhis2.angular.directives.js index 0e55da73a..07aa8d11a 100644 --- a/d2-tracker/dhis2.angular.directives.js +++ b/d2-tracker/dhis2.angular.directives.js @@ -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])};