Skip to content

Commit

Permalink
Add null to signature of getContributionMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
jq1836 committed Sep 23, 2023
1 parent b12873c commit 06935b0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frontend/src/components/c-ramp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@ export default defineComponent({
const newSize = 100 * (slice.insertions / +this.avgsize);
return Math.max(newSize * this.rampSize, 0.5);
},
getContributionMessage(slice: Commit, commit: CommitResult) {
if (this.tframe === 'commit') {
// commit of type CommitResult must be provided if tframe === 'commit', only pass null if tframe !== 'commit
getContributionMessage(slice: Commit, commit: CommitResult | null) {
if (this.tframe === 'commit' && commit !== null) {
return `[${slice.date}] ${commit.messageTitle}: +${commit.insertions} -${commit.deletions} lines `;
}
Expand Down

0 comments on commit 06935b0

Please sign in to comment.