Skip to content

Commit

Permalink
fix: we can't upload the same file twice in the FileUploader component (
Browse files Browse the repository at this point in the history
  • Loading branch information
azizChebbi authored Sep 18, 2023
1 parent 2f5bace commit 9e58421
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ export default class FileUploader extends React.Component<
) as string[];
this.setState({
filenames: this.props.multiple
? this.state.filenames.concat(filenames)
? [...new Set([...this.state.filenames, ...filenames])]
: filenames,
});
if (this.props.onChange) {
Expand Down

0 comments on commit 9e58421

Please sign in to comment.