From 3c6e9723e343efc3ac6d0870313a422fbac6b461 Mon Sep 17 00:00:00 2001
From: Ben Wheeler <wheeler.benjamin@gmail.com>
Date: Tue, 12 Nov 2019 15:04:55 -0500
Subject: [PATCH] reset title on transitioning to isShowingWithoutId

---
 src/lib/titled-hoc.jsx | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/lib/titled-hoc.jsx b/src/lib/titled-hoc.jsx
index 611599008..ab0cfd68b 100644
--- a/src/lib/titled-hoc.jsx
+++ b/src/lib/titled-hoc.jsx
@@ -27,6 +27,10 @@ const TitledHOC = function (WrappedComponent) {
             if (this.props.projectTitle !== prevProps.projectTitle) {
                 this.handleReceivedProjectTitle(this.props.projectTitle);
             }
+            if (this.props.isShowingWithoutId && !prevProps.isShowingWithoutId) {
+                const defaultProjectTitle = this.handleReceivedProjectTitle();
+                this.props.onUpdateProjectTitle(defaultProjectTitle);
+            }
             // if the projectTitle hasn't changed, but the reduxProjectTitle
             // HAS changed, we need to report that change to the projectTitle's owner
             if (this.props.reduxProjectTitle !== prevProps.reduxProjectTitle &&
@@ -40,6 +44,7 @@ const TitledHOC = function (WrappedComponent) {
                 newTitle = this.props.intl.formatMessage(messages.defaultProjectTitle);
             }
             this.props.onChangedProjectTitle(newTitle);
+            return newTitle;
         }
         render () {
             const {
-- 
GitLab