Skip to content

Commit 981c8d7

Browse files
committed
inbox: fix parsing inbox notification payload
1 parent 2684ffa commit 981c8d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/BatchInboxFetcher.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ const parseNotifications = (notifications: IInboxNotification[]): IInboxNotifica
119119
...notification,
120120
payload: {
121121
...(notification.payload as Record<string, unknown>),
122-
'com.batch': JSON.parse(batchPayload),
122+
'com.batch': typeof batchPayload == 'string' ? JSON.parse(batchPayload) : batchPayload,
123123
},
124124
};
125125
} catch (error) {

0 commit comments

Comments
 (0)