Skip to content

Commit

Permalink
Merge pull request #2678 from B3Partners/bugfix/prevent-duplicate-req…
Browse files Browse the repository at this point in the history
…uest

Prevent duplicate getCount request for attribute list
  • Loading branch information
mtoonen committed May 4, 2021
2 parents d4e7f1f + 10d528a commit 9be5c08
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 9be5c08

Please sign in to comment.