Skip to content

Commit ffab198

Browse files
committed
Default timeoutMs to low pri expiration if not provided
This is a required argument in the type signature but people may not supply it and this is a user facing object.
1 parent 1b41f2b commit ffab198

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react-reconciler/src/ReactFiberScheduler.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ export function computeExpirationForFiber(
274274
// Compute an expiration time based on the Suspense timeout.
275275
expirationTime = computeSuspenseExpiration(
276276
currentTime,
277-
suspenseConfig.timeoutMs | 0,
277+
suspenseConfig.timeoutMs | 0 || LOW_PRIORITY_EXPIRATION,
278278
);
279279
} else {
280280
// Compute an expiration time based on the Scheduler priority.
@@ -1031,7 +1031,7 @@ function inferTimeFromExpirationTime(
10311031
return (
10321032
earliestExpirationTimeMs -
10331033
(suspenseConfig !== null
1034-
? suspenseConfig.timeoutMs | 0
1034+
? suspenseConfig.timeoutMs | 0 || LOW_PRIORITY_EXPIRATION
10351035
: LOW_PRIORITY_EXPIRATION)
10361036
);
10371037
}

0 commit comments

Comments
 (0)