forked from AkkomaGang/akkoma-fe
don't crash out if notification status is null
This commit is contained in:
parent
109bb1fa8a
commit
ee2568d21a
1 changed files with 4 additions and 2 deletions
|
@ -408,8 +408,10 @@ export const parseNotification = (data) => {
|
||||||
if (masto) {
|
if (masto) {
|
||||||
output.type = mastoDict[data.type] || data.type
|
output.type = mastoDict[data.type] || data.type
|
||||||
output.seen = data.pleroma.is_seen
|
output.seen = data.pleroma.is_seen
|
||||||
|
if (data.status) {
|
||||||
output.status = isStatusNotification(output.type) ? parseStatus(data.status) : null
|
output.status = isStatusNotification(output.type) ? parseStatus(data.status) : null
|
||||||
output.action = output.status // TODO: Refactor, this is unneeded
|
output.action = output.status // TODO: Refactor, this is unneeded
|
||||||
|
}
|
||||||
output.target = output.type !== 'move'
|
output.target = output.type !== 'move'
|
||||||
? null
|
? null
|
||||||
: parseUser(data.target)
|
: parseUser(data.target)
|
||||||
|
|
Loading…
Reference in a new issue