From 57a531f292d6c4c560febf0ef2cfbd634fcda28e Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 30 Apr 2024 17:54:22 +0200 Subject: [PATCH] Fix test: also load if no initial hash is given --- src/Logic/Actors/InitialMapPositioning.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Logic/Actors/InitialMapPositioning.ts b/src/Logic/Actors/InitialMapPositioning.ts index 1c7439bf5..c65934941 100644 --- a/src/Logic/Actors/InitialMapPositioning.ts +++ b/src/Logic/Actors/InitialMapPositioning.ts @@ -70,7 +70,7 @@ export default class InitialMapPositioning { }) this.useTerrain = new ImmutableStore(layoutToUse.enableTerrain) - if(initialHash.match(/^(node|way|relation)\/[0-9]+$/)){ + if(initialHash?.match(/^(node|way|relation)\/[0-9]+$/)){ const [type, id] = initialHash.split("/") OsmObjectDownloader.RawDownloadObjectAsync(type, Number(id), Constants.osmAuthConfig.url+"/").then(osmObject => { if(osmObject === "deleted"){