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

[2.x] Inertia - ensure file selection is not empty before updating profile photo preview #782

Merged
merged 2 commits into from
May 12, 2021

Conversation

nkutinha
Copy link
Contributor

@nkutinha nkutinha commented May 11, 2021

Description
While selecting a new profile photo, canceling the file selection window results in errors being displayed in the console saying,

Failed to execute 'readAsDataURL' on 'FileReader': parameter 1 is not of type 'Blob'.

Video demonstration

For some reason, the @change="updatePhotoPreview" method is being triggered although no changes were made to the input. Possibly a Vue related issue since this doesn't happen in the Livewire stack?

Probably worth noting that I've run into this issue on Windows and specifically Chromium based browsers.

Steps to reproduce

  • Enable profile photos feature.
  • Visit the user profile page.
  • Select a new photo.
  • Select a new photo again, only this time leave your selection empty and click cancel.

@taylorotwell taylorotwell merged commit 86b5d32 into laravel:2.x May 12, 2021
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.

2 participants