Commit 778c0c7
committed
fix: guard against unknown epic IDs inflating progress above 100%
Unknown/legacy epic IDs persisted in state but absent from EPIC_CONFIG
would pass the `!EPIC_CONFIG[num]?.onDemand` filter (since
`undefined?.onDemand` is `undefined`, and `!undefined` is `true`),
inflating completedEpics count above the totalEpics denominator.
Add `EPIC_CONFIG[num] &&` guard in both `getProgressPercentage()` and
`_calculateProgressFromState()` so only known epics are counted.1 parent 55eed06 commit 778c0c7
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1358 | 1358 | | |
1359 | 1359 | | |
1360 | 1360 | | |
1361 | | - | |
| 1361 | + | |
1362 | 1362 | | |
1363 | 1363 | | |
1364 | 1364 | | |
| |||
1415 | 1415 | | |
1416 | 1416 | | |
1417 | 1417 | | |
1418 | | - | |
| 1418 | + | |
1419 | 1419 | | |
1420 | 1420 | | |
1421 | 1421 | | |
| |||
0 commit comments