don't crash out if notification status is null

This commit is contained in:
FloatingGhost 2022-12-20 13:20:13 +00:00 committed by hynet-mel
parent 109bb1fa8a
commit ee2568d21a

View file

@ -408,8 +408,10 @@ export const parseNotification = (data) => {
if (masto) {
output.type = mastoDict[data.type] || data.type
output.seen = data.pleroma.is_seen
output.status = isStatusNotification(output.type) ? parseStatus(data.status) : null
output.action = output.status // TODO: Refactor, this is unneeded
if (data.status) {
output.status = isStatusNotification(output.type) ? parseStatus(data.status) : null
output.action = output.status // TODO: Refactor, this is unneeded
}
output.target = output.type !== 'move'
? null
: parseUser(data.target)