File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -7084,5 +7084,26 @@ background-color: green;
7084
7084
</ html > ,
7085
7085
) ;
7086
7086
} ) ;
7087
+
7088
+ // @gate enableFloat
7089
+ it ( 'can update title tags' , async ( ) => {
7090
+ const root = ReactDOMClient . createRoot ( container ) ;
7091
+ await act ( ( ) => {
7092
+ root . render ( < title data-foo = "foo" > a title</ title > ) ;
7093
+ } ) ;
7094
+ await waitForAll ( [ ] ) ;
7095
+
7096
+ expect ( getMeaningfulChildren ( document . head ) ) . toEqual (
7097
+ < title data-foo = "foo" > a title</ title > ,
7098
+ ) ;
7099
+
7100
+ await act ( ( ) => {
7101
+ root . render ( < title data-foo = "bar" > another title</ title > ) ;
7102
+ } ) ;
7103
+ await waitForAll ( [ ] ) ;
7104
+ expect ( getMeaningfulChildren ( document . head ) ) . toEqual (
7105
+ < title data-foo = "bar" > another title</ title > ,
7106
+ ) ;
7107
+ } ) ;
7087
7108
} ) ;
7088
7109
} ) ;
Original file line number Diff line number Diff line change @@ -2692,7 +2692,7 @@ function commitMutationEffectsOnFiber(
2692
2692
const updatePayload : null | UpdatePayload =
2693
2693
( finishedWork . updateQueue : any ) ;
2694
2694
finishedWork . updateQueue = null ;
2695
- if ( updatePayload !== null ) {
2695
+ if ( updatePayload !== null || diffInCommitPhase ) {
2696
2696
try {
2697
2697
commitUpdate (
2698
2698
finishedWork . stateNode ,
You can’t perform that action at this time.
0 commit comments