You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When executing the addItemToOrder mutation, if that ProductVariant is already in the Order, it should be incremented rather than a new OrderLine being created. The logic for this is here:
However, if one or more custom fields is set on the OrderLine entity, and none are set in the addItemToOrder mutation, the orderLine var on line 322 is incorrectly undefined.
To Reproduce
Steps to reproduce the behavior:
Define a custom field on OrderLine and start server
invoke addItemToOrder with variant id 1, quantity 1, no custom fields.
repeat step 2
See that there are 2 OrderLines in the Order where there should only be 1.
Expected behavior
Correct de-deduplication of order lines when the custom fields are empty.
Environment (please complete the following information):
@vendure/core version: 0.16.1
Nodejs version: any
Database (mysql/postgres etc): any
The text was updated successfully, but these errors were encountered:
Describe the bug
When executing the
addItemToOrder
mutation, if that ProductVariant is already in the Order, it should be incremented rather than a new OrderLine being created. The logic for this is here:vendure/packages/core/src/service/services/order.service.ts
Lines 322 to 334 in 04a49bf
However, if one or more custom fields is set on the
OrderLine
entity, and none are set in theaddItemToOrder
mutation, theorderLine
var on line 322 is incorrectlyundefined
.To Reproduce
Steps to reproduce the behavior:
addItemToOrder
with variant id1
, quantity1
, no custom fields.Expected behavior
Correct de-deduplication of order lines when the custom fields are empty.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: