mirror of https://codeberg.org/pzp/pzp-goals.git
fix off-by-one in crossGoalWithTangle()
This commit is contained in:
parent
90fff89910
commit
e129a47912
|
@ -107,10 +107,10 @@ module.exports = {
|
||||||
case 'all':
|
case 'all':
|
||||||
return [0, maxDepth]
|
return [0, maxDepth]
|
||||||
case 'newest':
|
case 'newest':
|
||||||
const start = Math.max(0, maxDepth - goal.count)
|
const start = Math.max(0, maxDepth - goal.count + 1)
|
||||||
return [start, maxDepth]
|
return [start, maxDepth]
|
||||||
case 'oldest':
|
case 'oldest':
|
||||||
const end = Math.min(maxDepth, goal.count)
|
const end = Math.min(maxDepth, goal.count - 1)
|
||||||
return [0, end]
|
return [0, end]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue