Skip to content

Commit ccd4c7e

Browse files
committed
fix: avoid undefined result when features aggregation fails
1 parent 32b73b3 commit ccd4c7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

map/api/hooks/hooks.query.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ export async function aggregateFeaturesQuery (hook) {
402402
delete query.$aggregate
403403
delete query.$geoNear
404404
// Set result to avoid service DB call
405-
hook.result = aggregatedResults
405+
hook.result = aggregatedResults || []
406406
}
407407
return hook
408408
}

0 commit comments

Comments
 (0)