Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix creating modnotes with no label #941

Merged
merged 1 commit into from
May 14, 2024
Merged

Conversation

eritbh
Copy link
Member

@eritbh eritbh commented May 14, 2024

Setting the value prop of an <option> to undefined causes it to just not be set. value being missing causes the text of the option to be used as the value, and reddit will reject the text "(no label)" as a label type because it expects us to send nothing for no label. setting the prop to an empty string causes an empty string to be used as the form value, which is correctly translated to nothing being sent

setting the prop to `undefined` causes it to just not be set. `value` being missing causes the text of the option to be used as the value, and reddit will reject the text "(no label)" as a label type because it expects us to send nothing for no label
@eritbh eritbh added bug something isn't working module: modnotes labels May 14, 2024
@eritbh eritbh added this to the v7 milestone May 14, 2024
@eritbh eritbh merged commit d5608d8 into master May 14, 2024
3 checks passed
@eritbh eritbh deleted the fix/notes-with-no-label branch May 14, 2024 07:28
@eritbh eritbh mentioned this pull request May 14, 2024
14 tasks
eritbh added a commit that referenced this pull request Sep 5, 2024
eritbh added a commit that referenced this pull request Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something isn't working module: modnotes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant