editor: Prevent JS errors if no polyline has been drawn yet
This commit is contained in:
parent
354ca8d1d7
commit
1a2f9908fa
@ -28,6 +28,8 @@ if (editor_mode) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onDragEnd(e) {
|
function onDragEnd(e) {
|
||||||
|
if (!polyline)
|
||||||
|
return;
|
||||||
var latlngs = polyline.getLatLngs();
|
var latlngs = polyline.getLatLngs();
|
||||||
|
|
||||||
for (var i = 0; i < latlngs.length; i++) {
|
for (var i = 0; i < latlngs.length; i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user