mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-12-29 13:38:09 +02:00
Merge e82e53816c into a60cf63b2e
This commit is contained in:
commit
79c4d40765
1 changed files with 1 additions and 1 deletions
2
index.js
2
index.js
|
|
@ -111,7 +111,7 @@ const createClient = (profile, userAgent, opt = {}) => {
|
||||||
const {res} = await profile.request({profile, opt}, userAgent, req);
|
const {res} = await profile.request({profile, opt}, userAgent, req);
|
||||||
|
|
||||||
const ctx = {profile, opt, common, res};
|
const ctx = {profile, opt, common, res};
|
||||||
let results = (res[resultsField] || res.items || res.bahnhofstafelAbfahrtPositionen || res.bahnhofstafelAnkunftPositionen || res.entries.flat())
|
let results = (res[resultsField] || res.items || res.bahnhofstafelAbfahrtPositionen || res.bahnhofstafelAnkunftPositionen || res.entries?.flat() || [])
|
||||||
.map(res => parse(ctx, res)); // TODO sort?, slice
|
.map(res => parse(ctx, res)); // TODO sort?, slice
|
||||||
|
|
||||||
if (!opt.includeRelatedStations) {
|
if (!opt.includeRelatedStations) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue