Fix the Add-Ons page save never completing - #67
Open
djGLiTCH wants to merge 1 commit into
Open
Conversation
The onSuccess handler compares submitted values against stored data via valuesSchema, but the declaration was lost in a merge, leaving only its use. Every Save click throws ReferenceError inside submitForm() before setAddonsOptions is called, and the error is swallowed, so the Save button silently does nothing. Restore the cast of the submitted values.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On the current branch head, saving the Add-Ons Configuration page silently
does nothing:
onSuccessinwww/src/Pages/AddonsConfigPage.tsxusesvaluesSchemabut its declaration is missing (it looks like a merge droppedthe line), so
submitForm()throwsReferenceError: valuesSchema is not definedbeforesetAddonsOptionsis ever called, and the error isswallowed - no request, no toast.
This restores the cast, matching what main does at the same spot. Verified
against a live board (Haute42 COSMOX M Ultra Gen 2 and B16 running
this branch): before, clicking Save produced the ReferenceError and no
network traffic; after, Save posts
setAddonsOptionsand the boardacknowledges and persists.
Found while porting the Host Lighting add-on
(OpenStickCommunity#1691) onto this branch - the LED refactor,
OpenStickCommunity#1514 - for compatibility testing.