Skip to content

Commit 3d89dd7

Browse files
committed
add optional chaining to projectNameInput on focus
1 parent edae248 commit 3d89dd7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

client/modules/IDE/components/Toolbar.jsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ class Toolbar extends React.Component {
4141
if (this.canEditProjectName) {
4242
this.props.showEditProjectName();
4343
setTimeout(() => {
44-
if (this.projectNameInput) {
45-
this.projectNameInput.focus();
46-
}
44+
this.projectNameInput?.focus();
4745
}, 140);
4846
}
4947
}

0 commit comments

Comments
 (0)