Skip to content

Commit

Permalink
nullish coalescing assigning dispatch.req
Browse files Browse the repository at this point in the history
  • Loading branch information
f-w committed Dec 5, 2024
1 parent 9729620 commit 93baba9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/notifications/notifications.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ export class NotificationsController {
data.dispatch = data.dispatch ?? {};
data.dispatch.candidates =
data.dispatch.candidates ?? subCandidates.map((e) => e.id.toString());
data.dispatch.req = pick(this.req, ['user', 'protocol', 'hostname']);
data.dispatch.req ??= pick(this.req, ['user', 'protocol', 'hostname']);
await this.notificationsService.updateById(
data.id,
{
Expand Down

0 comments on commit 93baba9

Please sign in to comment.