Skip to content

Commit

Permalink
Prevent duplicate getCount request for attribute list
Browse files Browse the repository at this point in the history
  • Loading branch information
geertplaisier committed Apr 30, 2021
1 parent eb1ed12 commit 10d528a
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ export class AttributeListDataService implements OnDestroy {
tab: AttributeListTabModel,
tabFeatureData: AttributeListFeatureTypeData[],
): Observable<LoadTotalCountResult[]> {
const counts$ = [ tab.featureType, ...tabFeatureData.map(data => data.featureType) ]
.map(featureType => this.getCountForFeatureType$(tab, featureType, tabFeatureData));
const counts$ = tabFeatureData.map(data => this.getCountForFeatureType$(tab, data.featureType, tabFeatureData));
return forkJoin(counts$);
}

Expand Down

0 comments on commit 10d528a

Please sign in to comment.