forked from MapComplete/MapComplete
UX: don't prompt to login when trying to load an initial note
This commit is contained in:
parent
79314e1747
commit
6ccc9d63d0
1 changed files with 8 additions and 6 deletions
|
@ -93,12 +93,14 @@ export default class InitialMapPositioning {
|
||||||
} else if (layoutToUse.id === "notes" && initialHash?.match(/[0-9]+/)) {
|
} else if (layoutToUse.id === "notes" && initialHash?.match(/[0-9]+/)) {
|
||||||
console.log("Loading note", initialHash)
|
console.log("Loading note", initialHash)
|
||||||
const noteId = Number(initialHash)
|
const noteId = Number(initialHash)
|
||||||
osmConnection.getNote(noteId).then(note => {
|
if (osmConnection.isLoggedIn.data) {
|
||||||
const [lon, lat] = note.geometry.coordinates
|
osmConnection.getNote(noteId).then(note => {
|
||||||
console.log("Got note:", note)
|
const [lon, lat] = note.geometry.coordinates
|
||||||
this.location.set({ lon, lat })
|
console.log("Got note:", note)
|
||||||
}
|
this.location.set({ lon, lat })
|
||||||
)
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
} else if (
|
} else if (
|
||||||
Constants.GeoIpServer &&
|
Constants.GeoIpServer &&
|
||||||
lat.data === defaultLat &&
|
lat.data === defaultLat &&
|
||||||
|
|
Loading…
Reference in a new issue