X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/b52bdfd2537dd687e858b9a140744ccd9c161072..2ba00544d30017ad30570011b1a2bcc6a8da73a7:/src/lib/helpers.js?ds=sidebyside 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])]; }