Skip to content

Commit

Permalink
fix(status), remove irrelevant snap info for outdated components when…
Browse files Browse the repository at this point in the history
… the head is the same as latest (#9421)

Before:
> teambit.docs/docs-template current: 1.0.7 head:
81fafbec36995725fed26cef8feff57ef2be90e4 latest: 1.0.8

Now: 
 > teambit.docs/docs-template current: 1.0.7 head: 1.0.8
  • Loading branch information
davidfirst authored Jan 7, 2025
1 parent f58aacb commit e85aeef
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scopes/scope/objects/models/model-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,10 @@ export default class Component extends BitObject {
}
await this.setDivergeData(repo, false);
const divergeData = this.getDivergeData();
return divergeData.isTargetAhead() ? remoteHead.toString() : latestLocally;
if (divergeData.isTargetAhead()) {
return this.getTagOfRefIfExists(remoteHead) || remoteHead.toString();
}
return latestLocally;
}

async getRefOfAncestor(repo: Repository, generationsToGoBack: number): Promise<Ref> {
Expand Down

0 comments on commit e85aeef

Please sign in to comment.