diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b7a13cd1..bbf914514 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,12 @@ _Breaking developer changes, which may affect downstream projects or sites that #### :hammer: Development +# 2.30.1 +##### 2024-Aug-21 + +* Fix note not loading when iD is started with both an `id=note/123` and `map=…` hash parameter + + # 2.30.0 ##### 2024-Aug-21 diff --git a/modules/core/context.js b/modules/core/context.js index 8e6fdd655..c49245af7 100644 --- a/modules/core/context.js +++ b/modules/core/context.js @@ -222,17 +222,18 @@ export function coreContext() { context.zoomToNote = (noteId, zoomTo) => { context.loadNote(noteId, (err, result) => { if (err) return; - if (zoomTo === false) return; const entity = result.data.find(e => e.id === noteId); if (entity) { - // zoom to, used note loc - const note = services.osm.getNote(noteId); + // zoom to, used note loc + const note = services.osm.getNote(noteId); + if (zoomTo !== false) { context.map().centerZoom(note.loc,15); - // open note layer - const noteLayer = context.layers().layer('notes'); - noteLayer.enabled(true); - // select the note - context.enter(modeSelectNote(context, noteId)); + } + // open note layer + const noteLayer = context.layers().layer('notes'); + noteLayer.enabled(true); + // select the note + context.enter(modeSelectNote(context, noteId)); } }); };