Skip to content

Commit

Permalink
bugfix: fixed bug in image-picker, Uncaught TypeError: Cannot set pro…
Browse files Browse the repository at this point in the history
…perty 'value' of null (ant-design#2302)
  • Loading branch information
dqmmpb authored and lixiaoyang1992 committed Apr 26, 2018
1 parent ea0e705 commit 10ffa5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/image-picker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export default class ImagePicker extends React.Component<ImagePickerPropTypes, a
aria-label="Choose and add image"
>
<input
ref={(input) => { this.fileSelectorInput = input; }}
ref={(input) => { if (input) { this.fileSelectorInput = input; } }}
type="file"
accept={accept}
onChange={() => { this.onFileChange(); }}
Expand Down

0 comments on commit 10ffa5f

Please sign in to comment.