File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -741,7 +741,7 @@ class FileDialog extends GenericModal {
741
741
742
742
_getSelectedFilePath ( ) {
743
743
// Get the paths of all selected files. These will not be valid paths to move to.
744
- paths = [ ] ;
744
+ let paths = [ ] ;
745
745
let files = this . _getSelectedFilesInfo ( ) ;
746
746
if ( files . length < 1 ) return [ ] ;
747
747
@@ -762,10 +762,14 @@ class FileDialog extends GenericModal {
762
762
const fileNameField = this . _getElement ( 'fileNameField' ) ;
763
763
let filetype , filename ;
764
764
let selectedItem = this . _getSelectedFiles ( ) ;
765
- if ( selectedItem . length != 1 ) {
765
+ if ( selectedItem . length > 1 ) {
766
766
return ;
767
767
}
768
- selectedItem = selectedItem [ 0 ] ;
768
+ if ( selectedItem . length == 1 ) {
769
+ selectedItem = selectedItem [ 0 ] ;
770
+ } else {
771
+ selectedItem = null ;
772
+ }
769
773
770
774
if ( item !== undefined ) {
771
775
filetype = item . getAttribute ( "data-type" ) ;
You can’t perform that action at this time.
0 commit comments