smaller bugfix for max

main
HerrHase 3 days ago
parent 8e5bc3515d
commit 370c1bedeb

File diff suppressed because one or more lines are too long

@ -111,10 +111,8 @@
*/
handleSelectFile(event)
{
let index = 0
for (const file of event.target.files) {
if (!this.props.max || (this.props.max && (((index++) + 1) <= this.props.max))) {
if (!this.props.max || (this.props.max && (this.state.files.length < this.props.max))) {
this.state.files.push(file)
}
}

Loading…
Cancel
Save