Skip to content

fix: remove empty try/catch in ProblemRowReact (code-scanning #78) - #135

Merged
wrigjl merged 1 commit into
ReduxISU:ReduxAPI_GUIfrom
wrigjl:fix/78-empty-block-problemrow
Jul 15, 2026
Merged

fix: remove empty try/catch in ProblemRowReact (code-scanning #78)#135
wrigjl merged 1 commit into
ReduxISU:ReduxAPI_GUIfrom
wrigjl:fix/78-empty-block-problemrow

Conversation

@wrigjl

@wrigjl wrigjl commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

What

Removes a dead empty try {} catch (error) { ... } block in handleChangeInstance (components/pageblocks/ProblemRowReact.js). The try had no statements inside it, so the catch could never actually run — it wasn't guarding anything.

Which scan instance this fixes

Resolves code-scanning alert #78no-empty (Disallow empty block statements), flagged at components/pageblocks/ProblemRowReact.js:137-138.

Notes

The storedData variable a few lines above is also hardcoded to null, suggesting some localStorage read/write logic in this area was stripped out previously and this empty try/catch was left behind as a vestige. Left storedData alone since it's out of scope for this alert — flagging here in case it's worth a follow-up cleanup.

No behavior change: setProblemLocalInstance(event.target.value) and the rest of the handler still run exactly as before.

🤖 Generated with Claude Code

…U#78)

The try block in handleChangeInstance was empty -- no statements that
could throw -- so the catch existed only to handle an error that could
never occur. Removed both; setProblemLocalInstance runs unconditionally
as it did before.

Fixes js/no-empty alert flagged at
components/pageblocks/ProblemRowReact.js:137-138.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@wrigjl
wrigjl merged commit cb223ae into ReduxISU:ReduxAPI_GUI Jul 15, 2026
7 checks passed
@wrigjl
wrigjl deleted the fix/78-empty-block-problemrow branch July 15, 2026 17:23
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