Skip to content

Call setter only when technique has changed - #232

Merged
yousefmoazzam merged 1 commit into
mainfrom
fix-technique-selector-bug
Oct 15, 2026
Merged

yousefmoazzam merged 1 commit into
mainfrom
fix-technique-selector-bug

Conversation

@yousefmoazzam

Copy link
Copy Markdown
Collaborator

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).

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`).
@yousefmoazzam
yousefmoazzam merged commit c22999c into main Oct 15, 2026
1 check passed
@yousefmoazzam
yousefmoazzam deleted the fix-technique-selector-bug branch October 15, 2026 14:28
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