Skip to content

Commit fe9d75b

Browse files
committed
🐛 fix filename allowing empty/invalid strings
1 parent c4d5245 commit fe9d75b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

client/modules/IDE/components/FileNode.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export class FileNode extends React.Component {
4949
}
5050

5151
get updatedName() {
52-
return this.state.updatedName || this.props.name;
52+
return this.state.updatedName;
5353
}
5454

5555
commitFileNameChange() {
@@ -92,7 +92,6 @@ export class FileNode extends React.Component {
9292
const hasOnlyExtension = newFileExtension && newFileName === newFileExtension[0];
9393
if (hasEmptyFilename || hasNoExtension || notSameExtension || hasOnlyExtension || hasExtensionIfFolder) {
9494
this.setState({ updatedName: this.originalFileName });
95-
this.props.updateFileName(this.props.id, this.originalFileName);
9695
} else this.commitFileNameChange();
9796
}
9897

0 commit comments

Comments
 (0)