Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix Array.from syntax in nonmultiple file upload #2357

Conversation

omar-ahmed42
Copy link
Contributor

Description

  • Fix Array.from syntax in non-multiple file upload as Array.from() returns an empty array which is the case when a file is selected from an input element (when multiple attribute isn't supported) which can be found in Array.from(element.files[0]) -> results in an empty array.

Closes #(issue_number)

Checklist

  • I have read the Contribution Guidelines
  • I have performed a self-review of my own code
  • I have attached images of the change if it is UI based
  • I have commented my code, particularly in hard-to-understand areas
  • If my code has heavily changed functionality I have updated relevant docs on Stirling-PDFs doc repo
  • My changes generate no new warnings
  • I have read the section Add New Translation Tags (for new translation tags only)

- Fix Array.from syntax in nonmultiple file upload as Array.from(<non-array or string>) returns an empty array which is the case when a file is selected from an input element (when multiple attribute isn't  supported) which can be found in Array.from(element.files[0]) -> results in an empty array.
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. Bug Something isn't working labels Nov 29, 2024
@github-actions github-actions bot added the Front End Issues or pull requests related to front-end development label Nov 29, 2024
@reecebrowne reecebrowne self-requested a review November 29, 2024 12:20
@Frooodle Frooodle merged commit 99d481d into Stirling-Tools:main Nov 29, 2024
6 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Bug Something isn't working Front End Issues or pull requests related to front-end development size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants