Skip to content

Pr/issue 502#511

Open
Jackzzey wants to merge 3 commits into
dres-dev:devfrom
Jackzzey:pr/issue-502
Open

Pr/issue 502#511
Jackzzey wants to merge 3 commits into
dres-dev:devfrom
Jackzzey:pr/issue-502

Conversation

@Jackzzey
Copy link
Copy Markdown

@Jackzzey Jackzzey commented May 8, 2026

The removeTaskType, removeTaskGroup, and removeTask methods previously used Array.indexOf for lookup, which relies on reference equality. Objects returned from the API are new instances, so indexOf returned -1, causing splice(-1, 1) to silently delete the last element in the array instead of the intended item.

Replaced with findIndex using group id and task id guarding the splice with idx > -1 check. Done the same for the scoreboard viewer and had id based lookup.

Added unit tests for removing covering: name/ID-based matching, cross-reference equality, missing item safety, cascade deletion, and selected task deselection.

@lucaro lucaro requested review from lucaro and sauterl May 11, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant