File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
packages/scratch-gui/src/lib Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -31,14 +31,15 @@ const TitledHOC = function (WrappedComponent) {
3131 this . handleReceivedProjectTitle ( this . props . projectTitle ) ;
3232 }
3333 // if project is a new default project, and has loaded,
34- if ( this . props . isShowingWithoutId && prevProps . isAnyCreatingNewState ) {
34+ if ( this . props . isShowingWithoutId && ! this . props . isAnyCreatingNewState && prevProps . isAnyCreatingNewState ) {
3535 // reset title to default
36- const defaultProjectTitle = this . handleReceivedProjectTitle ( ) ;
37- this . props . onUpdateProjectTitle ( defaultProjectTitle ) ;
36+ this . handleReceivedProjectTitle ( ) ;
3837 }
3938 // if the projectTitle hasn't changed, but the reduxProjectTitle
4039 // HAS changed, we need to report that change to the projectTitle's owner
41- if ( this . props . reduxProjectTitle !== prevProps . reduxProjectTitle &&
40+ if ( ! this . props . isShowingWithoutId &&
41+ ! this . props . isAnyCreatingNewState &&
42+ this . props . reduxProjectTitle !== prevProps . reduxProjectTitle &&
4243 this . props . reduxProjectTitle !== this . props . projectTitle ) {
4344 this . props . onUpdateProjectTitle ( this . props . reduxProjectTitle ) ;
4445 }
You can’t perform that action at this time.
0 commit comments