Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix import of hoist-non-react-statics #2755

Merged
merged 3 commits into from Jul 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/react/src/errorboundary.tsx
@@ -1,5 +1,5 @@
import { captureException, ReportDialogOptions, Scope, showReportDialog, withScope } from '@sentry/browser';
import * as hoistNonReactStatic from 'hoist-non-react-statics';
import hoistNonReactStatics from 'hoist-non-react-statics';
import * as React from 'react';

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

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

Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/profiler.tsx
@@ -1,7 +1,7 @@
import { getCurrentHub, Hub } from '@sentry/browser';
import { Integration, IntegrationClass, Span, Transaction } from '@sentry/types';
import { timestampWithMs } from '@sentry/utils';
import * as hoistNonReactStatic from 'hoist-non-react-statics';
import hoistNonReactStatics from 'hoist-non-react-statics';
import * as React from 'react';

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

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

Expand Down
1 change: 1 addition & 0 deletions packages/typescript/tsconfig.json
Expand Up @@ -4,6 +4,7 @@
"declaration": true,
"declarationMap": true,
"downlevelIteration": true,
"esModuleInterop": true,
"inlineSources": true,
"importHelpers": true,
"lib": ["es6", "dom"],
Expand Down