Преглед на файлове

fix(cf): ProductEdit.vue addBundleItem 防止 null 报错

- 当 bundleItems 可能为 null 时默认值为空数组
- 防止 TypeError: Cannot read properties of null (reading 'bundleItems')
iwt преди 4 дни
родител
ревизия
08d52ac04c
променени са 1 файла, в които са добавени 1 реда и са изтрити 0 реда
  1. 1 0
      cfc-web/src/views/admin/ProductEdit.vue

+ 1 - 0
cfc-web/src/views/admin/ProductEdit.vue

@@ -460,6 +460,7 @@ export default {
         }
       },
     addBundleItem() {
+      this.bundleItems = this.bundleItems || []
       this.bundleItems.push({
         childProductId: null,
         childSkuId: null,