From f6feefc8452618e36ef27328e480be41002e78c8 Mon Sep 17 00:00:00 2001 From: exyi Date: Mon, 19 Oct 2020 18:47:34 +0000 Subject: [PATCH] Fixed points parsing in ksp grabber --- frontend/src/ksp-task-grabber.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/ksp-task-grabber.ts b/frontend/src/ksp-task-grabber.ts index b7db634..97b19bf 100644 --- a/frontend/src/ksp-task-grabber.ts +++ b/frontend/src/ksp-task-grabber.ts @@ -160,7 +160,7 @@ function parseTaskStatuses(doc: HTMLDocument): TaskStatus[] { const pointsStr = r.cells[4].textContent!.trim() const pointsMatch = /((–|\.|\d)+) *\/ *(\d+)/.exec(pointsStr) if (!pointsMatch) throw new Error() - let points = +pointsMatch[2] + let points = +pointsMatch[1] // points was a dash, means 0 if (isNaN(points)) { points = 0