From 7ff17ab72238ed66a45c512e7cd77ac46adc0b7d Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Tue, 20 Dec 2022 13:20:13 +0000 Subject: [PATCH] don't crash out if notification status is null --- src/services/entity_normalizer/entity_normalizer.service.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js index 465d6fad..df6c03b5 100644 --- a/src/services/entity_normalizer/entity_normalizer.service.js +++ b/src/services/entity_normalizer/entity_normalizer.service.js @@ -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)