Skip to content

Commit

Permalink
Revert back to unsafe type cast
Browse files Browse the repository at this point in the history
  • Loading branch information
jq1836 committed Oct 8, 2023
1 parent 6296790 commit 03f7d90
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions frontend/src/components/c-ramp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,8 @@ export default defineComponent({
}
const zoomUser = { ...user };
// Calculate total commit result insertion and deletion for the daily/weekly commit selected
zoomUser.commits = user.dailyCommits.map(
(dailyCommit) => ({
insertions: dailyCommit.commitResults.reduce((acc, currCommitResult) => acc + currCommitResult.insertions, 0),
deletions: dailyCommit.commitResults.reduce((acc, currCommitResult) => acc + currCommitResult.deletions, 0),
...dailyCommit,
}),
) as Commit[];
// Type cast here is unsafe
zoomUser.commits = user.dailyCommits as Commit[];
const info = {
zRepo: user.repoName,
Expand Down

0 comments on commit 03f7d90

Please sign in to comment.