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

Fixed Static task to not explicitly check for objData.file1 #966

Merged
merged 1 commit into from
Dec 20, 2022
Merged

Fixed Static task to not explicitly check for objData.file1 #966

merged 1 commit into from
Dec 20, 2022

Conversation

gzhihongwei
Copy link
Contributor

I was doing some local development on a static task and for some reason the form wasn't submitting properly. Digging into the modified file, there is an implicit assumption that the user's task will have a file upload form input. Instead of explicitly checking, I changed it to see if objData.file1 exists before accessing any further properties on that object.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 20, 2022
@gzhihongwei gzhihongwei changed the title Fixed check for file upload with optional chaining Fixed Static task to not explicitly check for objData.file Dec 20, 2022
@gzhihongwei gzhihongwei changed the title Fixed Static task to not explicitly check for objData.file Fixed Static task to not explicitly check for objData.file1 Dec 20, 2022
@JackUrb
Copy link
Contributor

JackUrb commented Dec 20, 2022

Ah nice catch! StaticHTMLBlueprint hasn't had a lot of use (or testing) compared to our other blueprints, and all the users I can think of have been leveraging file uploads in some form.

@JackUrb JackUrb merged commit 84ea43f into facebookresearch:main Dec 20, 2022
@gzhihongwei gzhihongwei deleted the static_html_submit_fix branch December 20, 2022 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants