From d7f954f36d2cce7f93f83be04cf314d2d77bb427 Mon Sep 17 00:00:00 2001 From: Jason Wright Date: Tue, 14 Jul 2026 13:43:31 -0600 Subject: [PATCH] fix: remove empty try/catch in ProblemRowReact (code-scanning #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 --- components/pageblocks/ProblemRowReact.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/components/pageblocks/ProblemRowReact.js b/components/pageblocks/ProblemRowReact.js index 9488e30..6d7b20c 100644 --- a/components/pageblocks/ProblemRowReact.js +++ b/components/pageblocks/ProblemRowReact.js @@ -134,9 +134,6 @@ export default function ProblemRowReact({ url, problemName, setProblemName, prob //Local state that handles problem instance change without triggering mass refreshing. const handleChangeInstance = (event) => { - try { - } - catch (error) { console.log("Couldn't clean problem instance: ", error); } setProblemLocalInstance(event.target.value) if (!instanceParsed.test) { defaultInstanceParsed.exampleStr = "";