Skip to content

Commit

Permalink
fix(pefcl): ensure user exists before emitting event
Browse files Browse the repository at this point in the history
  • Loading branch information
xElementzx committed Sep 30, 2023
1 parent d6ec5a8 commit 2effd63
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/server/services/account/account.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ export class AccountService {

t.afterCommit(() => {
emit(Broadcasts.RemovedSharedUser, account.toJSON());
emitNet(Broadcasts.RemovedSharedUser, user?.getSource(), account.toJSON());
if (user?.getSource())
emitNet(Broadcasts.RemovedSharedUser, user?.getSource(), account.toJSON());
});

t.commit();
Expand Down

0 comments on commit 2effd63

Please sign in to comment.