forked from MapComplete/MapComplete
Fix: add new items works again, fix #1593
This commit is contained in:
parent
7ace25d377
commit
c527427f70
2 changed files with 1 additions and 4 deletions
|
@ -19,9 +19,6 @@ export default abstract class OsmChangeAction {
|
||||||
constructor(mainObjectId: string, trackStatistics: boolean = true) {
|
constructor(mainObjectId: string, trackStatistics: boolean = true) {
|
||||||
this.trackStatistics = trackStatistics
|
this.trackStatistics = trackStatistics
|
||||||
this.mainObjectId = mainObjectId
|
this.mainObjectId = mainObjectId
|
||||||
if(mainObjectId === undefined || mainObjectId === null){
|
|
||||||
throw "OsmObject received '"+mainObjectId+"' as mainObjectId"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Perform(changes: Changes) {
|
public async Perform(changes: Changes) {
|
||||||
|
|
|
@ -102,7 +102,7 @@
|
||||||
console.log("Creating new point at", location, "snapped to", snapTo, "with tags", tags);
|
console.log("Creating new point at", location, "snapped to", snapTo, "with tags", tags);
|
||||||
|
|
||||||
let snapToWay: undefined | OsmWay = undefined;
|
let snapToWay: undefined | OsmWay = undefined;
|
||||||
if (snapTo !== undefined) {
|
if (snapTo !== undefined && snapTo !== null) {
|
||||||
const downloaded = await state.osmObjectDownloader.DownloadObjectAsync(snapTo, 0);
|
const downloaded = await state.osmObjectDownloader.DownloadObjectAsync(snapTo, 0);
|
||||||
if (downloaded !== "deleted") {
|
if (downloaded !== "deleted") {
|
||||||
snapToWay = downloaded;
|
snapToWay = downloaded;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue