mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Fix sanitize aggregate on parse objects (#8423)
This commit is contained in:
@@ -108,8 +108,8 @@ function sanitizeAggregate(rawAggregate: any): Aggregate {
|
||||
}
|
||||
}
|
||||
|
||||
for (const [operation, fields] of Object.entries(rawAggregate)) {
|
||||
if (typeof fields === 'string') aggregate[operation as keyof Aggregate] = fields.split(',');
|
||||
for (const [operation, fields] of Object.entries(aggregate)) {
|
||||
if (typeof fields === 'string') aggregate[operation as keyof Aggregate] = (fields as string).split(',');
|
||||
else if (Array.isArray(fields)) aggregate[operation as keyof Aggregate] = fields as string[];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user