CreateNewNode action: fix crash if option are undefined

This commit is contained in:
pietervdvn 2021-09-18 02:34:13 +02:00
parent 47011370dd
commit 0fa3a28a48

View file

@ -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[] {