From b74fa9868e91f333f5503ea6ce127d508fec1e4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Markb=C3=A5ge?= Date: Tue, 28 May 2019 14:19:51 -0700 Subject: [PATCH] Clean up (#15755) expirationTime has already been checked if it's sync. timeout can now be longer than 5 seconds when a suspense config is used. We might want to adjust the heuristics but it's not internally consistent without this. --- packages/react-reconciler/src/ReactFiberWorkLoop.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/react-reconciler/src/ReactFiberWorkLoop.js b/packages/react-reconciler/src/ReactFiberWorkLoop.js index c93985e536..52beda4e5c 100644 --- a/packages/react-reconciler/src/ReactFiberWorkLoop.js +++ b/packages/react-reconciler/src/ReactFiberWorkLoop.js @@ -493,13 +493,8 @@ function scheduleCallbackForRoot( ); } else { let options = null; - if (expirationTime !== Sync && expirationTime !== Never) { + if (expirationTime !== Never) { let timeout = expirationTimeToMs(expirationTime) - now(); - if (timeout > 5000) { - // Sanity check. Should never take longer than 5 seconds. - // TODO: Add internal warning? - timeout = 5000; - } options = {timeout}; }