Skip to content

Commit

Permalink
@uppy/core: fix metafields validation when used as function (#4276)
Browse files Browse the repository at this point in the history
  • Loading branch information
Murderlon committed Jan 26, 2023
1 parent a5786f3 commit 9d4d219
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@
}

.uppy-Dashboard-Item-errorMessageBtn {
font-size: 11px;
text-decoration: underline;
color: darken($red, 15%);
cursor: pointer;
font-weight: 500;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { h } from 'preact'

const metaFieldIdToName = (metaFieldId, metaFields) => {
const field = metaFields.filter(f => f.id === metaFieldId)
const fields = typeof metaFields === 'function' ? metaFields() : metaFields
const field = fields.filter(f => f.id === metaFieldId)
return field[0].name
}

Expand Down

0 comments on commit 9d4d219

Please sign in to comment.