From 4638f82635b5d4e8922cd3cb475df90861fffa1e Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Wed, 16 Feb 2022 00:14:22 +0100 Subject: [PATCH] Fix tests --- Logic/Osm/Changes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Logic/Osm/Changes.ts b/Logic/Osm/Changes.ts index 696c640b8..0aa0cd7ef 100644 --- a/Logic/Osm/Changes.ts +++ b/Logic/Osm/Changes.ts @@ -48,7 +48,7 @@ export class Changes { // If a pending change contains a negative ID, we save that this._nextId = Math.min(-1, ...this.pendingChanges.data?.map(pch => pch.id) ?? []) this.state = state; - this._changesetHandler = state.osmConnection.CreateChangesetHandler(state.allElements, this) + this._changesetHandler = state?.osmConnection?.CreateChangesetHandler(state.allElements, this) // Note: a changeset might be reused which was opened just before and might have already used some ids // This doesn't matter however, as the '-1' is per piecewise upload, not global per changeset