Skip to content

Commit b0ee542

Browse files
authored
Merge pull request #1439 from processing/title-indexing
Fixes #1425 - Removes sketch title from <title> for unsaved, new sketch
2 parents cd6d95a + b562173 commit b0ee542

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Diff for: client/modules/IDE/pages/IDEView.jsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,11 @@ class IDEView extends React.Component {
123123
this.autosaveInterval = null;
124124
}
125125

126+
getTitle = () => {
127+
const { id } = this.props.project;
128+
return id ? `p5.js Web Editor | ${this.props.project.name}` : 'p5.js Web Editor';
129+
}
130+
126131
isUserOwner() {
127132
return this.props.project.owner && this.props.project.owner.id === this.props.user.id;
128133
}
@@ -203,7 +208,7 @@ class IDEView extends React.Component {
203208
return (
204209
<div className="ide">
205210
<Helmet>
206-
<title>p5.js Web Editor | {this.props.project.name}</title>
211+
<title>{this.getTitle()}</title>
207212
</Helmet>
208213
{this.props.toast.isVisible && <Toast />}
209214
<Nav

0 commit comments

Comments
 (0)