From 0fa3a28a480c05055ceaa834f1e05789b7972a21 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Sat, 18 Sep 2021 02:34:13 +0200 Subject: [PATCH] CreateNewNode action: fix crash if option are undefined --- Logic/Osm/Actions/CreateNewNodeAction.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Logic/Osm/Actions/CreateNewNodeAction.ts b/Logic/Osm/Actions/CreateNewNodeAction.ts index 4b127a7da..86cacab20 100644 --- a/Logic/Osm/Actions/CreateNewNodeAction.ts +++ b/Logic/Osm/Actions/CreateNewNodeAction.ts @@ -24,7 +24,7 @@ export default class CreateNewNodeAction extends OsmChangeAction { throw "Lat or lon are undefined!" } this._snapOnto = options?.snapOnto; - this._reusePointDistance = options.reusePointWithinMeters ?? 1 + this._reusePointDistance = options?.reusePointWithinMeters ?? 1 } CreateChangeDescriptions(changes: Changes): ChangeDescription[] {