Elements-SY

modify

......@@ -524,11 +524,11 @@ export function removeDuplicates(arr, keys) {
* filterRepeat(arr, "name")
*/
export function filterRepeat(arr, key) {
const duplicateIds = arr
const newArr = arr
.map((item) => item[key])
.filter((key, index, array) => array.indexOf(key) !== index);
return arr.filter((item) => duplicateIds.includes(item[key]));
return arr.filter((item) => newArr.includes(item[key]));
}
/**
* Array Json
......