File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
packages/react-dom/src/server Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -56,10 +56,12 @@ export function validateContextBounds(
56
56
context : ReactContext < any > ,
57
57
threadID : ThreadID ,
58
58
) {
59
+ // If `react` package is < 16.6, _threadCount is undefined.
60
+ let initialThreadCount = context . _threadCount || 0 ;
59
61
// If we don't have enough slots in this context to store this threadID,
60
62
// fill it in without leaving any holes to ensure that the VM optimizes
61
63
// this as non-holey index properties.
62
- for ( let i = context . _threadCount ; i <= threadID ; i ++ ) {
64
+ for ( let i = initialThreadCount ; i <= threadID ; i ++ ) {
63
65
// We assume that this is the same as the defaultValue which might not be
64
66
// true if we're rendering inside a secondary renderer but they are
65
67
// secondary because these use cases are very rare.
You can’t perform that action at this time.
0 commit comments