UX: don't prompt to login when trying to load an initial note

This commit is contained in:
Pieter Vander Vennet 2024-12-13 14:54:06 +01:00
parent 79314e1747
commit 6ccc9d63d0

View file

@ -93,12 +93,14 @@ export default class InitialMapPositioning {
} else if (layoutToUse.id === "notes" && initialHash?.match(/[0-9]+/)) {
console.log("Loading note", initialHash)
const noteId = Number(initialHash)
if (osmConnection.isLoggedIn.data) {
osmConnection.getNote(noteId).then(note => {
const [lon, lat] = note.geometry.coordinates
console.log("Got note:", note)
this.location.set({ lon, lat })
}
)
}
} else if (
Constants.GeoIpServer &&
lat.data === defaultLat &&