1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2025-01-14 14:43:17 +08:00

Fixing missing list error

This commit is contained in:
Patrik J. Braun 2022-12-24 17:47:07 +01:00 committed by GitHub
parent 9fdd732ce5
commit 974182e810
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -841,7 +841,7 @@ export class SearchManager implements ISQLSearchManager {
case SearchQueryTypes.OR:
return {
type: query.type,
list: (query as SearchListQuery).list.map(
list: ((query as SearchListQuery).list || []).map(
(q): SearchQueryDTO => this.flattenSameOfQueries(q)
),
} as SearchListQuery;
@ -856,7 +856,7 @@ export class SearchManager implements ISQLSearchManager {
} as ORSearchQuery);
}
if (someOfQ.min === (query as SearchListQuery).list.length) {
if (someOfQ.min === ((query as SearchListQuery).list || []).length) {
return this.flattenSameOfQueries({
type: SearchQueryTypes.AND,
list: (someOfQ as SearchListQuery).list,