X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/b52bdfd2537dd687e858b9a140744ccd9c161072..23ad83a45b7cb0fb0c07109230e869ab2cb7b3b5:/src/lib/helpers.js diff --git a/src/lib/helpers.js b/src/lib/helpers.js index c95dbe9..0099d83 100644 --- a/src/lib/helpers.js +++ b/src/lib/helpers.js @@ -17,7 +17,7 @@ export function formatOSMType(sType, bExcludeExternal) { // w123 => ['W', 123] export function identifyLinkInQuery(query) { if (!query) return undefined; - const m = query.match(/\/(relation|way|node)\/(\d+)/) || query.match(/^([nwr])(\d+)$/i); + const m = query.match(/\/(relation|way|node)\/(-?\d+)/) || query.match(/^([nwr])(-?\d+)$/i); if (!m) return undefined; return [m[1][0].toUpperCase(), Number(m[2])]; }