mirror of
https://github.com/xtr-dev/payload-notifications.git
synced 2025-12-10 02:43:23 +00:00
Refactor: Simplify notifications plugin
This commit is contained in:
@@ -188,9 +188,9 @@ export function createNotificationsCollection(options: NotificationsPluginOption
|
||||
return
|
||||
}
|
||||
|
||||
let recipientId: string
|
||||
let recipientId: string|number
|
||||
|
||||
if (typeof doc.recipient === 'string') {
|
||||
if (typeof doc.recipient === 'string' || typeof doc.recipient === 'number') {
|
||||
recipientId = doc.recipient
|
||||
} else if (doc.recipient?.id) {
|
||||
recipientId = doc.recipient.id
|
||||
|
||||
Reference in New Issue
Block a user