parseWarning: handle missing summary/text 🐛

This commit is contained in:
Jannis R 2019-07-20 12:47:17 +02:00
parent f5121f1bf6
commit 3aaa1496f5
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5

View file

@ -31,8 +31,8 @@ const parseWarning = (profile, w, icons) => {
const res = {
id: w.hid || null,
type,
summary: brToNewline(w.head), // todo: decode HTML entities
text: brToNewline(w.text), // todo: decode HTML entities
summary: w.head ? brToNewline(w.head) : null, // todo: decode HTML entities
text: w.text ? brToNewline(w.text) : null, // todo: decode HTML entities
priority: w.prio,
category: w.cat || null // todo: parse to sth meaningful
}