Skip to content

Commit 4e8a250

Browse files
committed
Track the begin time instead of assuming this is the same as start time
1 parent e26fa0d commit 4e8a250

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/react-server/src/ReactFlightServerConfigDebugNode.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@ export function initAsyncDebugInfo(): void {
161161
case UNRESOLVED_AWAIT_NODE:
162162
case UNRESOLVED_PROMISE_NODE: {
163163
// If we begin before we resolve, that means that this is actually already resolved but
164-
// the promiseResolve hook is called at the end of the execution. This means that it was
165-
// actually already resolved when we started so we just use the start time as the end time.
166-
resolvePromiseOrAwaitNode(node, node.start);
164+
// the promiseResolve hook is called at the end of the execution. So we track the time
165+
// in the beginning instead.
166+
resolvePromiseOrAwaitNode(node, performance.now());
167167
break;
168168
}
169169
}

0 commit comments

Comments
 (0)