diff --git a/src/lib/titled-hoc.jsx b/src/lib/titled-hoc.jsx index 6115990087deef53433ee043a9616e9ef4a499b4..ab0cfd68b6aa571add97899d4640a1249e41ced2 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 {