Fixed points parsing in ksp grabber
This commit is contained in:
parent
1de48177dc
commit
f6feefc845
1 changed files with 1 additions and 1 deletions
|
@ -160,7 +160,7 @@ function parseTaskStatuses(doc: HTMLDocument): TaskStatus[] {
|
||||||
const pointsStr = r.cells[4].textContent!.trim()
|
const pointsStr = r.cells[4].textContent!.trim()
|
||||||
const pointsMatch = /((–|\.|\d)+) *\/ *(\d+)/.exec(pointsStr)
|
const pointsMatch = /((–|\.|\d)+) *\/ *(\d+)/.exec(pointsStr)
|
||||||
if (!pointsMatch) throw new Error()
|
if (!pointsMatch) throw new Error()
|
||||||
let points = +pointsMatch[2]
|
let points = +pointsMatch[1]
|
||||||
// points was a dash, means 0
|
// points was a dash, means 0
|
||||||
if (isNaN(points)) {
|
if (isNaN(points)) {
|
||||||
points = 0
|
points = 0
|
||||||
|
|
Reference in a new issue