From 86af9c8f7fa8580f041fa57f9ed61aef5fe24419 Mon Sep 17 00:00:00 2001 From: Sonja Happ Date: Fri, 29 May 2020 13:26:43 +0200 Subject: [PATCH] add option for no file selected --- src/file/select-file.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/file/select-file.js b/src/file/select-file.js index 132caf9..bf7469a 100644 --- a/src/file/select-file.js +++ b/src/file/select-file.js @@ -69,11 +69,15 @@ class SelectFile extends React.Component { render() { - let fileOptions; + let fileOptions = []; if (this.props.files.length > 0){ - fileOptions = this.props.files.map(f => + fileOptions.push( + + ) + + fileOptions.push(this.props.files.map(f => - ); + )); } else { fileOptions = }