Skip to content

Commit

Permalink
fix(merge-from-scope): filter out soft-removed components before chec…
Browse files Browse the repository at this point in the history
…king for squash eligibility (#7049)
  • Loading branch information
davidfirst authored Feb 16, 2023
1 parent e004760 commit 09ad9e0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scopes/lanes/merge-lanes/merge-lanes.main.runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ export class MergeLanesMain {
const bitObjectsPerComp = await pMapSeries(idsToMerge, async (id) => {
const modelComponent = await this.scope.legacyScope.getModelComponent(id);
const fromVersionObj = await modelComponent.loadVersion(id.version as string, repo);
if (fromVersionObj.isRemoved()) return undefined;
const fromLaneHead = modelComponent.getRef(id.version as string);
if (!fromLaneHead) throw new Error(`lane head must be defined for ${id.toString()}`);
const toLaneHead = toLaneObj ? toLaneObj.getComponent(id)?.head : modelComponent.head || null;
Expand Down

0 comments on commit 09ad9e0

Please sign in to comment.