Skip to content

Commit

Permalink
Default timeoutMs to low pri expiration if not provided
Browse files Browse the repository at this point in the history
This is a required argument in the type signature but people may not
supply it and this is a user facing object.
  • Loading branch information
sebmarkbage committed May 10, 2019
1 parent 1b41f2b commit ffab198
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react-reconciler/src/ReactFiberScheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ export function computeExpirationForFiber(
// Compute an expiration time based on the Suspense timeout.
expirationTime = computeSuspenseExpiration(
currentTime,
suspenseConfig.timeoutMs | 0,
suspenseConfig.timeoutMs | 0 || LOW_PRIORITY_EXPIRATION,
);
} else {
// Compute an expiration time based on the Scheduler priority.
Expand Down Expand Up @@ -1031,7 +1031,7 @@ function inferTimeFromExpirationTime(
return (
earliestExpirationTimeMs -
(suspenseConfig !== null
? suspenseConfig.timeoutMs | 0
? suspenseConfig.timeoutMs | 0 || LOW_PRIORITY_EXPIRATION
: LOW_PRIORITY_EXPIRATION)
);
}
Expand Down

0 comments on commit ffab198

Please sign in to comment.