File tree 1 file changed +2
-2
lines changed
client/modules/IDE/components
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 {
116
116
const hasExtensionIfFolder = this . props . fileType === 'folder' && hasPeriod ;
117
117
const notSameExtension = oldFileExtension && newFileExtension
118
118
&& 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 ] ;
121
121
if ( hasEmptyFilename || hasNoExtension || notSameExtension || hasOnlyExtension || hasExtensionIfFolder ) {
122
122
this . setUpdatedName ( currentName ) ;
123
123
} else {
You can’t perform that action at this time.
0 commit comments