From b929e779520b54095bc3ea0ea1fe738937c259da Mon Sep 17 00:00:00 2001 From: Cassie Tarakajian Date: Tue, 26 May 2020 18:05:35 -0400 Subject: [PATCH] Fixes #1425 - Removes sketch title from for unsaved, new sketch --- client/modules/IDE/pages/IDEView.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client/modules/IDE/pages/IDEView.jsx b/client/modules/IDE/pages/IDEView.jsx index 14ac255c..803d81a5 100644 --- a/client/modules/IDE/pages/IDEView.jsx +++ b/client/modules/IDE/pages/IDEView.jsx @@ -123,6 +123,11 @@ class IDEView extends React.Component { this.autosaveInterval = null; } + getTitle = () => { + const { id } = this.props.project; + return id ? `p5.js Web Editor | ${this.props.project.name}` : 'p5.js Web Editor'; + } + isUserOwner() { return this.props.project.owner && this.props.project.owner.id === this.props.user.id; } @@ -203,7 +208,7 @@ class IDEView extends React.Component { return ( <div className="ide"> <Helmet> - <title>p5.js Web Editor | {this.props.project.name} + {this.getTitle()} {this.props.toast.isVisible && }