We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 017d28a + f9b993b commit 60e1e21Copy full SHA for 60e1e21
src/model/AreaDataSource.ts
@@ -287,6 +287,10 @@ export default class AreaDataSource extends MongoDataSource<AreaType> {
287
})
288
}
289
const ancestorsCSV = ancestors.join(',')
290
- return await this.findDescendantsByPath(ancestorsCSV)
+ const [leafAreas, nonLeafAreas] = await Promise.all([
291
+ this.findDescendantsByPath(ancestorsCSV, true),
292
+ this.findDescendantsByPath(ancestorsCSV, false)
293
+ ])
294
+ return nonLeafAreas.concat(leafAreas)
295
296
0 commit comments