Skip to content

Conversation

@Sija
Copy link
Member

@Sija Sija commented Jan 30, 2026

In general, to fix this kind of issue you either (a) remove the redundant initial assignment, or (b) collapse the declaration and first real assignment together so that the variable is declared without an unused default. This keeps the code’s behavior identical while eliminating dead stores.

Here, parsed is always assigned inside the if/else; we can safely remove the = NaN initializer and keep just let parsed;. JavaScript let declarations without initialization are legal, and both branches of the if/else guarantee that parsed receives a value before the subsequent Number.isNaN(parsed) check. No other code changes or imports are needed, and no external behavior changes.

Concretely, in runtime/src/decoders.js, change line 155 from let parsed = NaN; to let parsed;. All other lines remain unchanged.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@Sija Sija marked this pull request as ready for review January 30, 2026 01:11
@Sija Sija requested a review from gdotdesign January 30, 2026 01:12
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.

2 participants