Skip to content

Commit

Permalink
fix(core): Fix floating promise & missed eventBus (#2779)
Browse files Browse the repository at this point in the history
  • Loading branch information
tianyingchun authored Apr 12, 2024
1 parent bdf2329 commit 603a36e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/core/src/config/order/default-order-process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -415,13 +415,12 @@ export function configureDefaultOrderProcess(options: DefaultOrderProcessOptions
await Promise.all(
order.lines.map(line => {
line.orderPlacedQuantity = line.quantity;
connection
return connection
.getRepository(ctx, OrderLine)
.update(line.id, { orderPlacedQuantity: line.quantity });
return line;
}),
);
eventBus.publish(new OrderPlacedEvent(fromState, toState, ctx, order));
await eventBus.publish(new OrderPlacedEvent(fromState, toState, ctx, order));
await orderSplitter.createSellerOrders(ctx, order);
}
}
Expand Down

0 comments on commit 603a36e

Please sign in to comment.