Skip to content

RelicSection Bug #1

@S-i-l-v-e-t

Description

@S-i-l-v-e-t

Bug description

When editing a sub-affix of a relic, the change may be applied to the wrong relic slot, causing multiple relics to appear to update simultaneously.

Root cause

Inside RelicCard, the function handleSubAffixChange uses a parameter named index to represent the sub-affix index (0–3).
However, the same index is also passed directly to onRelicChange(index, ...), where the parent component expects index to represent the relic slot index.

Because function parameters shadow outer-scope variables in JavaScript/TypeScript, the sub-affix index unintentionally overrides the relic slot index. As a result, editing a sub-affix writes data to relics[0..3] instead of the current relic slot.

Probably Solution

I've made a branch with this bug fixed, and will create a pull-request soon. Check this out to see if this looks good to you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions