Fix Limits for multi-query sections

This commit is contained in:
HighImKevin
2026-10-21 15:18:05 -04:00
parent adfc690af2
commit 706c3f1d3a
2 changed files with 4 additions and 4 deletions
+3 -1
View File
@@ -1130,7 +1130,9 @@
});
}
const limit = sectionConfig.itemLimit || sectionConfig.queries?.[0]?.queryOptions?.Limit || 0;
// Sum of all query limits
const totalLimit = sectionConfig.queries?.reduce((acc, query) => acc + (query.queryOptions?.Limit || 0), 0);
const limit = sectionConfig.itemLimit || totalLimit || 0;
if (sectionConfig.queries?.[0]?.queryOptions?.SortBy === 'Random' || sectionConfig.sortBy === 'Random') {
if (limit > 0 && sectionConfig.limitBeforeSort === true) {