File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -741,7 +741,7 @@ class FileDialog extends GenericModal {
741741
742742 _getSelectedFilePath ( ) {
743743 // Get the paths of all selected files. These will not be valid paths to move to.
744- paths = [ ] ;
744+ let paths = [ ] ;
745745 let files = this . _getSelectedFilesInfo ( ) ;
746746 if ( files . length < 1 ) return [ ] ;
747747
@@ -762,10 +762,14 @@ class FileDialog extends GenericModal {
762762 const fileNameField = this . _getElement ( 'fileNameField' ) ;
763763 let filetype , filename ;
764764 let selectedItem = this . _getSelectedFiles ( ) ;
765- if ( selectedItem . length != 1 ) {
765+ if ( selectedItem . length > 1 ) {
766766 return ;
767767 }
768- selectedItem = selectedItem [ 0 ] ;
768+ if ( selectedItem . length == 1 ) {
769+ selectedItem = selectedItem [ 0 ] ;
770+ } else {
771+ selectedItem = null ;
772+ }
769773
770774 if ( item !== undefined ) {
771775 filetype = item . getAttribute ( "data-type" ) ;
You can’t perform that action at this time.
0 commit comments