From aea2d3aa50dbed672f79fe55a9157c2b1de9f3b6 Mon Sep 17 00:00:00 2001 From: Jonathan Foucher Date: Fri, 6 Nov 2020 13:48:55 +0100 Subject: [PATCH 1/2] Initialize radius variable to prevent errors on electron on Windows 10 --- src/edit/handler/Edit.Circle.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/edit/handler/Edit.Circle.js b/src/edit/handler/Edit.Circle.js index 9a14f5224..f7b3d5888 100644 --- a/src/edit/handler/Edit.Circle.js +++ b/src/edit/handler/Edit.Circle.js @@ -24,6 +24,7 @@ L.Edit.Circle = L.Edit.CircleMarker.extend({ _resize: function (latlng) { var moveLatLng = this._moveMarker.getLatLng(); + var radius = 0; // Calculate the radius based on the version if (L.GeometryUtil.isVersion07x()) { radius = moveLatLng.distanceTo(latlng); From 97e74ca27a7d19a39a08268962702c4be2653139 Mon Sep 17 00:00:00 2001 From: Jonathan Foucher Date: Fri, 6 Nov 2020 14:07:04 +0100 Subject: [PATCH 2/2] define type variable to fix bug in electron win10 --- src/ext/GeometryUtil.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ext/GeometryUtil.js b/src/ext/GeometryUtil.js index 5a95cfaf3..5efae3985 100755 --- a/src/ext/GeometryUtil.js +++ b/src/ext/GeometryUtil.js @@ -70,7 +70,7 @@ if (isMetric) { units = ['ha', 'm']; - type = typeof isMetric; + var type = typeof isMetric; if (type === 'string') { units = [isMetric]; } else if (type !== 'boolean') {