From 2c87e1330f0b7210d5015f8a6fbaf3b2bbe8f7b4 Mon Sep 17 00:00:00 2001 From: Yousef Moazzam Date: Thu, 15 Oct 2026 15:19:28 +0100 Subject: [PATCH] Call setter only when technique has changed If the technique toggle is clicked such that the technique isn't changed (ie, the technique toggle button corresponding to the already selected technique is clicked), `null` is the new value from the change handler, which causes the technique to be set to `null`, and crashes the app when the technique value is attempted to be turned to a string with all lower case characters (the `toLowerCase()` is present on strings but not on `null`). --- .../src/components/ProcessingView/TechniqueSelector.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/unified/src/components/ProcessingView/TechniqueSelector.tsx b/frontend/unified/src/components/ProcessingView/TechniqueSelector.tsx index fbeb76ea..f15af0af 100644 --- a/frontend/unified/src/components/ProcessingView/TechniqueSelector.tsx +++ b/frontend/unified/src/components/ProcessingView/TechniqueSelector.tsx @@ -35,7 +35,9 @@ const TechniqueSelector = ({ _: React.MouseEvent, newTechnique: Technique ) => { - setTechnique(newTechnique); + if (newTechnique) { + setTechnique(newTechnique); + } }; return (