mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 23:29:35 +02:00
parseWarning: handle missing summary/text 🐛
This commit is contained in:
parent
f5121f1bf6
commit
3aaa1496f5
1 changed files with 2 additions and 2 deletions
|
@ -31,8 +31,8 @@ const parseWarning = (profile, w, icons) => {
|
||||||
const res = {
|
const res = {
|
||||||
id: w.hid || null,
|
id: w.hid || null,
|
||||||
type,
|
type,
|
||||||
summary: brToNewline(w.head), // todo: decode HTML entities
|
summary: w.head ? brToNewline(w.head) : null, // todo: decode HTML entities
|
||||||
text: brToNewline(w.text), // todo: decode HTML entities
|
text: w.text ? brToNewline(w.text) : null, // todo: decode HTML entities
|
||||||
priority: w.prio,
|
priority: w.prio,
|
||||||
category: w.cat || null // todo: parse to sth meaningful
|
category: w.cat || null // todo: parse to sth meaningful
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue