Skip to content

Commit

Permalink
fix: Upload should work without children
Browse files Browse the repository at this point in the history
  • Loading branch information
benjycui committed Nov 24, 2016
1 parent 9183ef0 commit f5cc937
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions components/upload/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,11 @@ export default class Upload extends React.Component<UploadProps, any> {
[`${prefixCls}-disabled`]: disabled,
});

const uploadButton = children
? <div className={uploadButtonCls}>
<RcUpload {...rcUploadProps} ref="upload" />
</div>
: null;
const uploadButton = (
<div className={uploadButtonCls} style={{ display: children ? '' : 'none'}}>
<RcUpload {...rcUploadProps} ref="upload" />
</div>
);

if (listType === 'picture-card') {
return (
Expand Down

0 comments on commit f5cc937

Please sign in to comment.