File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
client/modules/IDE/components Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -116,8 +116,8 @@ export class FileNode extends React.Component {
116116 const hasExtensionIfFolder = this . props . fileType === 'folder' && hasPeriod ;
117117 const notSameExtension = oldFileExtension && newFileExtension
118118 && oldFileExtension [ 0 ] . toLowerCase ( ) !== newFileExtension [ 0 ] . toLowerCase ( ) ;
119- const hasEmptyFilename = updatedName === '' ;
120- const hasOnlyExtension = newFileExtension && updatedName === newFileExtension [ 0 ] ;
119+ const hasEmptyFilename = updatedName . trim ( ) === '' ;
120+ const hasOnlyExtension = newFileExtension && updatedName . trim ( ) === newFileExtension [ 0 ] ;
121121 if ( hasEmptyFilename || hasNoExtension || notSameExtension || hasOnlyExtension || hasExtensionIfFolder ) {
122122 this . setUpdatedName ( currentName ) ;
123123 } else {
You can’t perform that action at this time.
0 commit comments