diff --git a/packages/react-server-dom-webpack/src/ReactFlightDOMClient.js b/packages/react-server-dom-webpack/src/ReactFlightDOMClient.js index d8b5def41e041..32f8e794f4f70 100644 --- a/packages/react-server-dom-webpack/src/ReactFlightDOMClient.js +++ b/packages/react-server-dom-webpack/src/ReactFlightDOMClient.js @@ -35,12 +35,18 @@ function startReadingFromStream( } const buffer: Uint8Array = (value: any); processBinaryChunk(response, buffer); - return reader.read().then(progress, error); + return reader + .read() + .then(progress) + .catch(error); } function error(e) { reportGlobalError(response, e); } - reader.read().then(progress, error); + reader + .read() + .then(progress) + .catch(error); } function createFromReadableStream(