This commit is contained in:
KarimAldeen 2024-03-25 09:32:12 +03:00
parent c31cbe28f7
commit 7db6880b31
2 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ export function AddNewVariation(Varibletaps: any[], data: any, AddVariation: any
console.log(mappedAttributes, "mappedAttributes");
// Flatten the array of arrays
const flattenedAttributes = mappedAttributes?.flat();
const flattenedAttributes = mappedAttributes?.filter(Boolean)?.flat();
const arrayOfObjects = flattenedAttributes?.map((subArray: any, index: any) => {
console.log(subArray, "subArray");

View File

@ -262,7 +262,7 @@ const ViewProduct = () => {
console.log(mappedAttributes, "mappedAttributes");
// Flatten the array of arrays
const flattenedAttributes = mappedAttributes?.flat();
const flattenedAttributes = mappedAttributes?.filter(Boolean)?.flat();
const arrayOfObjects = flattenedAttributes?.map((subArray: any, index: any) => {
console.log(subArray, "subArray");