We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 797eb9c commit fc3e9b4Copy full SHA for fc3e9b4
leetcode.js
@@ -56,7 +56,7 @@ exports.getLeetCodeStats = async function getLeetCodeStats() {
56
const totalSubmission = matchedUser.submitStats.totalSubmissionNum[i].submissions
57
let question = {
58
"difficulty": difficulty,
59
- "acceptedRate": (acSubmission / totalSubmission * 100),
+ "acceptedRate": totalSubmission == 0 ? 0.0 : (acSubmission / totalSubmission * 100),
60
"solvedRadio": accepted + "/" + allQuestion
61
}
62
result.solved.push(question)
package.json
@@ -1,6 +1,6 @@
1
{
2
"name": "leetcode-box",
3
- "version": "0.1.0",
+ "version": "0.1.2",
4
"description": "Update a gist to contain your leetcode stats",
5
"main": "index.js",
6
"scripts": {
0 commit comments