diff --git a/server-plugins/notification/src/index.ts b/server-plugins/notification/src/index.ts index b1062965ff..221d397544 100644 --- a/server-plugins/notification/src/index.ts +++ b/server-plugins/notification/src/index.ts @@ -76,7 +76,7 @@ export async function getEmployee (employee: Ref, control: TriggerCont { limit: 1 } ) )[0] - return account + return account !== undefined ? control.hierarchy.as(account, contact.mixin.Employee) : undefined } /**