8000 Merge pull request #172 from SparklesCN/master · sciwizard/leetcode-cli@5a27061 · GitHub
[go: up one dir, main page]

Skip to content

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5a27061

Browse files
authored
Merge pull request skygragon#172 from SparklesCN/master
Fixed bug "[WARN] Failed to get submission beat ratio." on Issues@156
2 parents 7dd96fc + 4657db6 commit 5a27061

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/commands/submit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ cmd.handler = function(argv) {
7676

7777
let ratio = 0.0;
7878
for (let score of scores) {
79-
if (parseFloat(score[0]) > myRuntime)
79+
if (parseFloat(score[0]) >= myRuntime)
8080
ratio += parseFloat(score[1]);
8181
}
8282

lib/plugins/leetcode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ plugin.getSubmission = function(submission, cb) {
342342
let re = body.match(/submissionCode:\s('[^']*')/);
343343
if (re) submission.code = eval(re[1]);
344344

345-
re = body.match(/distribution_formatted:\s('[^']+')/);
345+
re = body.match(/runtimeDistributionFormatted:\s('[^']+')/);
346346
if (re) submission.distributionChart = JSON.parse(eval(re[1]));
347347
return cb(null, submission);
348348
});

0 commit comments

Comments
 (0)
0