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

Update FileUpload.vue, fix for "_vm.getFileErrors(...).join is not a function" error #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

itcyborg
Copy link

@itcyborg itcyborg commented Jun 6, 2021

Fix for issue: getcandy/hub#53
Check if an array of errors is returned or a String.

Fix for issue: getcandy/hub#53
Check if an array of errors is returned or  a String.
@alecritson
Copy link
Contributor

Hi @itcyborg

Thanks for this PR, it would be good to some more information about the error you got, just so we can be sure adjusting the hub is the correct way to go and it's not something that needs changing on the API side.

So just a couple of questions:

  1. What steps were taken to reproduce this?
  2. Was the error from the API or generated client side?
  3. What was the actual error that got displayed when this was changed?

@itcyborg
Copy link
Author

itcyborg commented Jun 7, 2021

Steps to reproduce

  1. Install the published version of hub and using the boilerplate for candy-api.
  2. Add a product using hub
  3. Try to upload an image using the provided form in hub. (I tried using bmp, jpg and png; only one image uploaded at a time)
  4. Open devtools console then upload, an error "_vm.getFileErrors(...).join is not a function" will be thrown in the console.
  5. This error is specifically on the frontend, as it is thrown before the request is sent to the api. I'm still auditing and bug-checking the api, thought I'll be raising issues and possible PR for them soon. The above error indicates that it is only assuming that errors will return an array and not a string.
  • I did the update manually on my side though I can't build without moving the edited node modules manually without repackaging already made packages. It worked for my case but I've managed to reproduce it on my dev and staging servers using direct builds from the mainstream.

In case of further queries, let me know.

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