mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-08 22:02:54 +00:00
Optimize feed engine normalization loop
Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
22350b9189
commit
6672be9281
2 files changed
+77
-3
No files matched your search
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user