@infrab4a/connect 4.0.0-beta.21 → 4.0.0-beta.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2019,12 +2019,12 @@ class HomeFirestoreRepository extends withCrudFirestore(withHelpers(withFirestor
2019
2019
  interceptors,
2020
2020
  });
2021
2021
  this.homeCategoryGroupToPlain = (homeCategoryGroup) => ({
2022
- category: homeCategoryGroup.category.toPlain(),
2023
- products: homeCategoryGroup.products.map((product) => product.toPlain()),
2022
+ category: homeCategoryGroup.category?.toPlain(),
2023
+ products: homeCategoryGroup.products?.map((product) => product?.toPlain()).filter(Boolean) || [],
2024
2024
  });
2025
2025
  this.plainToHomeCategoryGroup = (homeCategoryGroup) => ({
2026
- category: Category.toInstance(homeCategoryGroup.category),
2027
- products: homeCategoryGroup.products.map((product) => Product.toInstance(product)),
2026
+ category: Category.toInstance(homeCategoryGroup?.category),
2027
+ products: homeCategoryGroup.products?.map((product) => Product.toInstance(product)),
2028
2028
  });
2029
2029
  }
2030
2030
  buildModelInstance() {