Skip to content

Commit af05c4a

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 a3e9565 commit af05c4a

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.
@@ -1028,7 +1028,7 @@ function inferTimeFromExpirationTime(
10281028
return (
10291029
earliestExpirationTimeMs -
10301030
(suspenseConfig !== null
1031-
? suspenseConfig.timeoutMs | 0
1031+
? (suspenseConfig.timeoutMs | 0) || LOW_PRIORITY_EXPIRATION
10321032
: LOW_PRIORITY_EXPIRATION)
10331033
);
10341034
}

0 commit comments

Comments
 (0)