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

Combination of "requiredMetaFields" and "metaFields" as function call #4273

Closed
2 tasks done
jvelten opened this issue Jan 11, 2023 · 1 comment · Fixed by #4276
Closed
2 tasks done

Combination of "requiredMetaFields" and "metaFields" as function call #4273

jvelten opened this issue Jan 11, 2023 · 1 comment · Fixed by #4276
Labels

Comments

@jvelten
Copy link
Contributor

jvelten commented Jan 11, 2023

Initial checklist

  • I understand this is a bug report and questions should be posted in the Community Forum
  • I searched issues and couldn’t find anything (or linked relevant results below)

Link to runnable example

https://codesandbox.io/s/uppy-dashboard-forked-i4iuvf

Steps to reproduce

Combination of "restrictions.requiredMetaFields" in Uppy.Core and "metaFields" in Uppy.Dashboard as function call results in an error inside uppy-library on opening the FileCard to edit metafields (auto-open after upload in the attached sandbox).

Error

Expected behavior

Making sure that the metafields to call is an array before calling filter().

Actual behavior

Theres a filter() call on metafields, so excepted is an array but it is possible to define metafields as a function call.
Error message: "Uncaught (in promise) TypeError: metaFields.filter is not a function"

Error2

@Murderlon
Copy link
Member

Good catch, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants