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 a2c2c72 commit db11fe8Copy full SHA for db11fe8
1 file changed
packages/react-router/src/server/instrumentation/reactRouter.ts
@@ -37,14 +37,12 @@ export class ReactRouterInstrumentation extends InstrumentationBase<Instrumentat
37
COMPONENT,
38
supportedVersions,
39
(moduleExports: ReactRouterModuleExports) => {
40
- if (isWrapped(moduleExports['createRequestHandler'])) {
41
- this._unwrap(moduleExports, 'createRequestHandler');
42
- }
43
- this._wrap(moduleExports, 'createRequestHandler', _patchCreateRequestHandler);
44
- return moduleExports;
45
- },
46
- (moduleExports: ReactRouterModuleExports) => {
47
+ const { createRequestHandler, ...rest } = moduleExports;
+
+ return {
+ ...rest,
+ createRequestHandler: _patchCreateRequestHandler(createRequestHandler),
+ };
48
},
49
);
50
0 commit comments