@factorypure/client-helpers 1.1.11 → 1.1.12
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.
- package/dist/index.js +10 -13
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1353,20 +1353,17 @@ function handleDuplicatesV2(results) {
|
|
|
1353
1353
|
else {
|
|
1354
1354
|
const existingItem = filteredUniqueResultsMap[key];
|
|
1355
1355
|
if (new Date(item.created_at) > new Date(existingItem.created_at)) {
|
|
1356
|
-
// Mark old item as duplicate
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
if (!foundResult.filter_results) {
|
|
1360
|
-
foundResult.filter_results = [];
|
|
1361
|
-
}
|
|
1362
|
-
foundResult.filter_results.push({
|
|
1363
|
-
ruleId: 'duplicate',
|
|
1364
|
-
severity: FilterSeverity.BLOCK,
|
|
1365
|
-
message: HIDE_REASONS.DUPLICATE,
|
|
1366
|
-
metadata: { key },
|
|
1367
|
-
timestamp: new Date().toISOString(),
|
|
1368
|
-
});
|
|
1356
|
+
// Mark old item as duplicate (existingItem is already a reference to the object in results array)
|
|
1357
|
+
if (!existingItem.filter_results) {
|
|
1358
|
+
existingItem.filter_results = [];
|
|
1369
1359
|
}
|
|
1360
|
+
existingItem.filter_results.push({
|
|
1361
|
+
ruleId: 'duplicate',
|
|
1362
|
+
severity: FilterSeverity.BLOCK,
|
|
1363
|
+
message: HIDE_REASONS.DUPLICATE,
|
|
1364
|
+
metadata: { key },
|
|
1365
|
+
timestamp: new Date().toISOString(),
|
|
1366
|
+
});
|
|
1370
1367
|
filteredUniqueResultsMap[key] = item;
|
|
1371
1368
|
}
|
|
1372
1369
|
else {
|