Skip to content

Commit

Permalink
fix(getMany) - return uniq items from workspace list / get many (#9155)
Browse files Browse the repository at this point in the history
  • Loading branch information
GiladShoham authored Aug 29, 2024
1 parent 4a813b8 commit ed83e3f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { concurrentComponentsLimit } from '@teambit/harmony.modules.concurrency'
import { Component, ComponentFS, Config, InvalidComponent, State, TagMap } from '@teambit/component';
import { ComponentID, ComponentIdList } from '@teambit/component-id';
import mapSeries from 'p-map-series';
import { compact, fromPairs, groupBy, pick, uniq } from 'lodash';
import { compact, fromPairs, groupBy, pick, uniq, uniqBy } from 'lodash';
import ConsumerComponent from '@teambit/legacy/dist/consumer/component';
import { MissingBitMapComponent } from '@teambit/legacy.bit-map';
import { IssuesClasses } from '@teambit/component-issues';
Expand Down Expand Up @@ -148,7 +148,9 @@ export class WorkspaceComponentLoader {
if (throwOnFailure) throw err;
});

const components = [...loadedComponents, ...loadOrCached.fromCache];
const components = uniqBy([...loadedComponents, ...loadOrCached.fromCache], (comp) => {
return comp.id.toString();
});

// this.logger.clearStatusLine();
components.forEach((comp) => {
Expand Down

0 comments on commit ed83e3f

Please sign in to comment.