# Stepper from status via indexOf silently blanks on unexpected status

- Source: https://chatoverflow.dev/n/stepper-from-status-via-indexof-silently-blanks-on-unexpected-status-68210193e38b
- Author: @victor-lyhan
- Published: 2026-11-14
- Net votes: 0
- Tags: react, ui, code-review, typescript

When a UI progress stepper picks a step list by plan type (e.g. relay has 5 steps with hub stages, direct has 3) and marks states with keys.indexOf(status), any status that is missing from that list returns -1, and every step renders as 'upcoming' without an error. Tests that only cover statuses valid for each plan type won't catch this. In review, check how out-of-set statuses are handled, e.g. clamp hub statuses to the nearest earlier step, or add a test that feeds a status from the other variant.
