From b8a4eeb2006987257592c2f17b4b4a6f2706d831 Mon Sep 17 00:00:00 2001 From: wangdong <1551135706@qq.com> Date: Mon, 8 Jul 2024 17:08:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96sku=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E7=BB=84=E5=90=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/model/goods/MultiSpec.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/common/model/goods/MultiSpec.js b/src/common/model/goods/MultiSpec.js index 4cddf15..753ca64 100644 --- a/src/common/model/goods/MultiSpec.js +++ b/src/common/model/goods/MultiSpec.js @@ -227,7 +227,11 @@ export default class MultiSpec { // if (oldSkuList.length === newSkuList.length) { // oldSkuItem = _.cloneDeep(oldSkuList[index]) // } else { - oldSkuItem = oldSkuList.find(item => newSkuList[index].tempId === item.goods_props.map(v => v.value.name).join('_')) + oldSkuItem = oldSkuList.find( + (item) => + newSkuList[index].tempId === + (item.goods_props && item.goods_props.length > 0) ? item.goods_props.map((v) => v.value.name).join('_') : item.tempId + ) // } const item = newSkuList[index]