parseHint: parse code & text properly 🐛

This commit is contained in:
Jannis R 2019-09-03 15:33:30 +02:00
parent 9a6bc2df0d
commit 5ea22f7a59
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5

View file

@ -12,6 +12,7 @@ const codesByIcon = Object.assign(Object.create(null), {
// "tagL": [
// "RES_JNY_DTL" // only shown in journey detail
// ]
// todo: https://github.com/public-transport/hafas-client/issues/5
const parseHint = (profile, h, _) => {
// todo: C
@ -39,8 +40,8 @@ const parseHint = (profile, h, _) => {
if (h.type === 'A' || h.type === 'I') {
return {
type: 'hint',
code: h.code || null,
text: h.txtN || null
code,
text
}
}