File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -239,11 +239,13 @@ class Dropzone extends React.Component {
239
239
// execute the timeout only if the FileDialog is opened in the browser
240
240
if ( this . isFileDialogActive ) {
241
241
setTimeout ( ( ) => {
242
- // Returns an object as FileList
243
- const { files } = this . fileInputEl
242
+ if ( this . fileInputEl != null ) {
243
+ // Returns an object as FileList
244
+ const { files } = this . fileInputEl
244
245
245
- if ( ! files . length ) {
246
- this . isFileDialogActive = false
246
+ if ( ! files . length ) {
247
+ this . isFileDialogActive = false
248
+ }
247
249
}
248
250
249
251
if ( typeof onFileDialogCancel === 'function' ) {
@@ -439,8 +441,8 @@ Dropzone.propTypes = {
439
441
disableClick : PropTypes . bool ,
440
442
441
443
/**
442
- * Enable/disable the dropzone entirely
443
- */
444
+ * Enable/disable the dropzone entirely
445
+ */
444
446
disabled : PropTypes . bool ,
445
447
446
448
/**
You can’t perform that action at this time.
0 commit comments