Skip to content

Commit

Permalink
fix(core): Fix publishing CustomerEvent without customer ID
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley committed Aug 18, 2021
1 parent c141b80 commit 03cd5d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/service/services/customer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ export class CustomerService {
customer = patchEntity(existing, input);
customer.channels.push(await this.connection.getEntityOrThrow(ctx, Channel, ctx.channelId));
} else {
customer = new Customer(input);
customer = await this.connection.getRepository(ctx, Customer).save(new Customer(input));
this.channelService.assignToCurrentChannel(customer, ctx);
this.eventBus.publish(new CustomerEvent(ctx, customer, 'created'));
}
Expand Down

0 comments on commit 03cd5d7

Please sign in to comment.