diff options
author | Markus Koch <markus@notsyncing.net> | 2020-04-19 09:14:19 +0200 |
---|---|---|
committer | Markus Koch <markus@notsyncing.net> | 2020-04-19 09:14:19 +0200 |
commit | 1a2f9908fac4917abdb54ef0c52dcf702a140ba2 (patch) | |
tree | f29df9d258ddd30d7010ce3e9a5247f7857ccb0a | |
parent | 354ca8d1d7f92010b9d5f931c8effe09d858e6d5 (diff) | |
download | lifomapserver-1a2f9908fac4917abdb54ef0c52dcf702a140ba2.tar.gz lifomapserver-1a2f9908fac4917abdb54ef0c52dcf702a140ba2.tar.bz2 lifomapserver-1a2f9908fac4917abdb54ef0c52dcf702a140ba2.zip |
editor: Prevent JS errors if no polyline has been drawn yet
-rw-r--r-- | htdocs/streeteditor.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/htdocs/streeteditor.js b/htdocs/streeteditor.js index 8b86a4a..27addb5 100644 --- a/htdocs/streeteditor.js +++ b/htdocs/streeteditor.js @@ -28,6 +28,8 @@ if (editor_mode) { } function onDragEnd(e) { + if (!polyline) + return; var latlngs = polyline.getLatLngs(); for (var i = 0; i < latlngs.length; i++) { |