From 7d8d9ba7cefd78f0e5378749585209006e57e022 Mon Sep 17 00:00:00 2001 From: Sheng Chen Date: Wed, 9 Oct 2019 20:15:53 +0800 Subject: [PATCH] Fix the NPE for the percent field of the problem --- lib/commands/list.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/commands/list.js b/lib/commands/list.js index c010de86..963284a3 100644 --- a/lib/commands/list.js +++ b/lib/commands/list.js @@ -73,7 +73,7 @@ cmd.handler = function(argv) { problem.fid, problem.name, h.prettyLevel(problem.level), - problem.percent.toFixed(2)); + (problem.percent || 0).toFixed(2)); if (argv.extra) { let badges = [problem.category];