# HG changeset patch # User Markus Kottlaender # Date 1542286024 -3600 # Node ID 1335e088e7ef80ace3601968d258eb5ce96778e4 # Parent 03c820e255739144512f45a225b3419e360441b6 fixed bug it was possible to submit the coordinates input field when it's empty, causing the fairway profile to crash diff -r 03c820e25573 -r 1335e088e7ef client/src/fairway/Fairwayprofile.vue --- a/client/src/fairway/Fairwayprofile.vue Thu Nov 15 12:16:00 2018 +0100 +++ b/client/src/fairway/Fairwayprofile.vue Thu Nov 15 13:47:04 2018 +0100 @@ -75,7 +75,10 @@ Enter coordinates manually:

-
@@ -518,12 +521,14 @@ const coordinates = this.coordinatesInput .split(",") .map(coord => parseFloat(coord.trim())); - this.applyCoordinates([ - coordinates[1], - coordinates[0], - coordinates[3], - coordinates[2] - ]); + if (coordinates.length === 4) { + this.applyCoordinates([ + coordinates[1], + coordinates[0], + coordinates[3], + coordinates[2] + ]); + } }, applyCoordinates(coordinates) { if (coordinates.length === 4) {