Skip to content

Commit

Permalink
Update leetcode.js
Browse files Browse the repository at this point in the history
fixed bug for "[WARN] Failed to get submission beat ratio."
  • Loading branch information
SparklesCN authored Aug 7, 2019
1 parent 9a0e155 commit 4657db6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/plugins/leetcode.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ plugin.getSubmission = function(submission, cb) {
let re = body.match(/submissionCode:\s('[^']*')/);
if (re) submission.code = eval(re[1]);

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

0 comments on commit 4657db6

Please sign in to comment.