@@ -1867,12 +1867,8 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
1867
1867
// This is a new mount or this boundary is already showing a fallback state.
1868
1868
// Mark this subtree context as having at least one invisible parent that could
1869
1869
// handle the fallback state.
1870
- // Boundaries without fallbacks or should be avoided are not considered since
1871
- // they cannot handle preferred fallback states.
1872
- if (
1873
- nextProps . fallback !== undefined &&
1874
- nextProps . unstable_avoidThisFallback !== true
1875
- ) {
1870
+ // Avoided boundaries are not considered since they cannot handle preferred fallback states.
1871
+ if ( nextProps . unstable_avoidThisFallback !== true ) {
1876
1872
suspenseContext = addSubtreeSuspenseContext (
1877
1873
suspenseContext ,
1878
1874
InvisibleParentSuspenseContext ,
@@ -1910,22 +1906,18 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
1910
1906
if ( current === null ) {
1911
1907
// Initial mount
1912
1908
// If we're currently hydrating, try to hydrate this boundary.
1913
- // But only if this has a fallback.
1914
- if ( nextProps . fallback !== undefined ) {
1915
- tryToClaimNextHydratableInstance ( workInProgress ) ;
1916
- // This could've been a dehydrated suspense component.
1917
- if ( enableSuspenseServerRenderer ) {
1918
- const suspenseState : null | SuspenseState =
1919
- workInProgress . memoizedState ;
1920
- if ( suspenseState !== null ) {
1921
- const dehydrated = suspenseState . dehydrated ;
1922
- if ( dehydrated !== null ) {
1923
- return mountDehydratedSuspenseComponent (
1924
- workInProgress ,
1925
- dehydrated ,
1926
- renderLanes ,
1927
- ) ;
1928
- }
1909
+ tryToClaimNextHydratableInstance ( workInProgress ) ;
1910
+ // This could've been a dehydrated suspense component.
1911
+ if ( enableSuspenseServerRenderer ) {
1912
+ const suspenseState : null | SuspenseState = workInProgress . memoizedState ;
1913
+ if ( suspenseState !== null ) {
1914
+ const dehydrated = suspenseState . dehydrated ;
1915
+ if ( dehydrated !== null ) {
1916
+ return mountDehydratedSuspenseComponent (
1917
+ workInProgress ,
1918
+ dehydrated ,
1919
+ renderLanes ,
1920
+ ) ;
1929
1921
}
1930
1922
}
1931
1923
}
0 commit comments