Skip to content

Do not pass filename == null to FileData.append #23

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

Merged
merged 1 commit into from
Mar 17, 2023

Conversation

fsoikin
Copy link
Contributor

@fsoikin fsoikin commented Feb 22, 2023

Description of the change

When calling appendBlob or setBlob, passing Nothing for the filename parameter translates into calling fd.append(_, _, null), which has the effect of setting filename to "null" (at least on Chromium and FireFox), rather than the intended behavior of getting the filename from the File object.

This change makes it so that Nothing on PureScript side translates to undefined on JS side, which works as expected.


Checklist:

  • Added the change to the changelog's "Unreleased" section with a reference to this PR (e.g. "- Made a change (#0000)")
  • [ ] Linked any existing issues or proposals that this pull request should close
  • [ ] Updated or added relevant documentation
  • [ ] Added a test for the contribution (if applicable)

@fsoikin fsoikin changed the title Do not pass filename == null to FileData.append Do not pass filename == null to FileData.append Feb 22, 2023
@fsoikin
Copy link
Contributor Author

fsoikin commented Mar 6, 2023

Are there some additional steps I need to take to have this merged?
@garyb perhaps?

@garyb
Copy link
Member

garyb commented Mar 17, 2023

Sorry, I've had a busy few weeks!

@garyb garyb merged commit 93068c5 into purescript-web:master Mar 17, 2023
@fsoikin fsoikin deleted the missing-filename branch March 17, 2023 02:19
@fsoikin
Copy link
Contributor Author

fsoikin commented Mar 17, 2023

No worries @garyb, thank you for merging!

@garyb
Copy link
Member

garyb commented Mar 20, 2023

Just remembered to make a release for this! It's out as v5.0.1.

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.

3 participants