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]+/)) {
|
||||
console.log("Loading note", initialHash)
|
||||
const noteId = Number(initialHash)
|
||||
osmConnection.getNote(noteId).then(note => {
|
||||
const [lon, lat] = note.geometry.coordinates
|
||||
console.log("Got note:", note)
|
||||
this.location.set({ lon, lat })
|
||||
}
|
||||
)
|
||||
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 &&
|
||||
|
|
Loading…
Reference in a new issue