fix: routes - don't render route with <2 points

This commit is contained in:
Azgaar 2024-08-23 18:26:12 +02:00
parent 1f280133be
commit b54f758350
4 changed files with 16 additions and 4 deletions

View file

@ -1636,7 +1636,8 @@ function drawRoutes() {
const routePaths = {};
for (const route of pack.routes) {
const {i, group} = route;
const {i, group, points} = route;
if (!points || points.length < 2) continue;
if (!routePaths[group]) routePaths[group] = [];
routePaths[group].push(`<path id="route${i}" d="${Routes.getPath(route)}"/>`);
}