Skip to content

Commit

Permalink
fix(add-item): check if new item id not equal to variation id
Browse files Browse the repository at this point in the history
  • Loading branch information
leomp12 committed Jun 29, 2020
1 parent 2e3c160 commit 483b580
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/methods/add-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default ({ data, save }, emitter, [newItem, canSave = false]) => {
}

if (!fixedItem) {
if (!newItem._id) {
if (!newItem._id || newItem._id === newItem.variation_id) {
newItem._id = randomObjectId()
}
data.items.push(newItem)
Expand Down

0 comments on commit 483b580

Please sign in to comment.