allow links with zoom in coords field

This commit is contained in:
HF 2024-02-14 00:14:50 +01:00
parent 1da5d130c6
commit b39125fbfb

View File

@ -484,7 +484,7 @@ export function coordsFromString(url) {
if (splitInd !== -1) { if (splitInd !== -1) {
part = part.slice(0, splitInd); part = part.slice(0, splitInd);
} }
coords = part.split(',').map((z) => parseInt(z, 10)).slice(1); coords = part.split(',').map((z) => parseInt(z, 10)).slice(1, 3);
} }
if (coords.length !== 2 || coords.some(Number.isNaN)) { if (coords.length !== 2 || coords.some(Number.isNaN)) {
coords = url.split('_').map((z) => parseInt(z, 10)); coords = url.split('_').map((z) => parseInt(z, 10));