Skip to content

Commit fc0af9e

Browse files
authored
fix: Fix import of hoist-non-react-statics (#2755)
1 parent 83ffef5 commit fc0af9e

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

packages/react/src/errorboundary.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { captureException, ReportDialogOptions, Scope, showReportDialog, withScope } from '@sentry/browser';
2-
import * as hoistNonReactStatic from 'hoist-non-react-statics';
2+
import hoistNonReactStatics from 'hoist-non-react-statics';
33
import * as React from 'react';
44

55
export const UNKNOWN_COMPONENT = 'unknown';
@@ -142,7 +142,7 @@ function withErrorBoundary<P extends object>(
142142

143143
// Copy over static methods from Wrapped component to Profiler HOC
144144
// See: https://reactjs.org/docs/higher-order-components.html#static-methods-must-be-copied-over
145-
hoistNonReactStatic(Wrapped, WrappedComponent);
145+
hoistNonReactStatics(Wrapped, WrappedComponent);
146146
return Wrapped;
147147
}
148148

packages/react/src/profiler.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { getCurrentHub, Hub } from '@sentry/browser';
22
import { Integration, IntegrationClass, Span, Transaction } from '@sentry/types';
33
import { timestampWithMs } from '@sentry/utils';
4-
import * as hoistNonReactStatic from 'hoist-non-react-statics';
4+
import hoistNonReactStatics from 'hoist-non-react-statics';
55
import * as React from 'react';
66

77
export const UNKNOWN_COMPONENT = 'unknown';
@@ -209,7 +209,7 @@ function withProfiler<P extends object>(
209209

210210
// Copy over static methods from Wrapped component to Profiler HOC
211211
// See: https://reactjs.org/docs/higher-order-components.html#static-methods-must-be-copied-over
212-
hoistNonReactStatic(Wrapped, WrappedComponent);
212+
hoistNonReactStatics(Wrapped, WrappedComponent);
213213
return Wrapped;
214214
}
215215

packages/typescript/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"declaration": true,
55
"declarationMap": true,
66
"downlevelIteration": true,
7+
"esModuleInterop": true,
78
"inlineSources": true,
89
"importHelpers": true,
910
"lib": ["es6", "dom"],

0 commit comments

Comments
 (0)