MCPcopy
hub / github.com/facebook/react / abort

Function abort

packages/react-client/src/ReactFlightReplyClient.js:875–886  ·  packages/react-client/src/ReactFlightReplyClient.js::abort
(reason: mixed)

Source from the content-addressed store, hash-verified

873 }
874
875 function abort(reason: mixed): void {
876 if (pendingParts > 0) {
877 pendingParts = 0; class="cm">// Don't resolve again later.
878 class="cm">// Resolve with what we have so far, which may have holes at this point.
879 class="cm">// They'll error when the stream completes on the server.
880 if (formData === null) {
881 resolve(json);
882 } else {
883 resolve(formData);
884 }
885 }
886 }
887
888 const json = serializeModel(root, 0);
889

Callers

nothing calls this directly

Calls 1

resolveFunction · 0.50

Tested by

no test coverage detected