We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ea86d0 commit c94f72dCopy full SHA for c94f72d
packages/react/src/ReactFetch.js
@@ -118,6 +118,9 @@ if (enableCache && enableFetchInstrumentation) {
118
// of the body so that it can be read multiple times.
119
return match.then(response => response.clone());
120
};
121
+ // We don't expect to see any extra properties on fetch but if there are any,
122
+ // copy them over. Useful for extended fetch environments or mocks.
123
+ Object.assign(fetch, originalFetch);
124
} catch (error) {
125
// Log even in production just to make sure this is seen if only prod is frozen.
126
// eslint-disable-next-line react-internal/no-production-logging
0 commit comments