fix the issue with FileCard rendering 0 in place of edit button, because props.metaFields.length

fixed by checking props.metaFields.length > 0, which returns true/false instead of 0
thanks @goto-bus-stop! //cc @lakesare
This commit is contained in:
Artur Paikin 2019-07-02 17:02:22 +02:00
parent b12cac4765
commit 1d8ee14ead

View file

@ -6,7 +6,7 @@ const { iconPencil, iconCross, iconCopyLink } = require('../../icons')
const renderEditButton = (props) => (
!props.uploadInProgressOrComplete &&
props.metaFields &&
props.metaFields.length &&
props.metaFields.length > 0 &&
<button
class="uppy-u-reset uppy-DashboardItem-action uppy-DashboardItem-action--edit"
type="button"