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) {
31
31
this . handleReceivedProjectTitle ( this . props . projectTitle ) ;
32
32
}
33
33
// 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 ) {
35
35
// reset title to default
36
- const defaultProjectTitle = this . handleReceivedProjectTitle ( ) ;
37
- this . props . onUpdateProjectTitle ( defaultProjectTitle ) ;
36
+ this . handleReceivedProjectTitle ( ) ;
38
37
}
39
38
// if the projectTitle hasn't changed, but the reduxProjectTitle
40
39
// 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 &&
42
43
this . props . reduxProjectTitle !== this . props . projectTitle ) {
43
44
this . props . onUpdateProjectTitle ( this . props . reduxProjectTitle ) ;
44
45
}
You can’t perform that action at this time.
0 commit comments