Optimize feed engine normalization loop

Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-02-05 20:50:30 +00:00
1 parent 22350b9189
commit 6672be9281
2 files changed
+77 -3

No files matched your search

+1 -3
View File
@@ -205,10 +205,8 @@ export function createFeedEngine({ logger } = {}) {
for (const stage of entry.stages) {
const result = await stage(items, context);
if (Array.isArray(result)) {
if (Array.isArray(result) && result !== items) {
items = normalizeItems(result);
} else if (result == null) {
items = normalizeItems(items);
}
}