fix station enrichment

This commit is contained in:
Traines 2025-03-14 17:19:48 +00:00
parent 0ef3935a35
commit 1927f98906

View file

@ -7,7 +7,7 @@ const ADDRESS = 'ADR';
const leadingZeros = /^0+/; const leadingZeros = /^0+/;
const parseLocation = (ctx, l) => { const parseLocation = (ctx, l) => {
const {profile, common} = ctx; const {profile} = ctx;
if (!l) { if (!l) {
return null; return null;
@ -53,16 +53,6 @@ const parseLocation = (ctx, l) => {
return stop; return stop;
} }
if (name && common?.locations?.[name] && res.id === null) {
delete res.type;
delete res.id;
return {
...common.locations[name],
...res,
};
}
res.name = name; res.name = name;
res = profile.enrichStation(ctx, res); res = profile.enrichStation(ctx, res);
@ -87,6 +77,7 @@ const enrichStation = (ctx, stop, locations) => {
...rich, ...rich,
...stop, ...stop,
}; };
delete stop.lines;
} }
return stop; return stop;
}; };