Skip to content

Commit

Permalink
fix: Fix import of hoist-non-react-statics (#2755)
Browse files Browse the repository at this point in the history
  • Loading branch information
timdorr committed Jul 21, 2020
1 parent 83ffef5 commit fc0af9e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
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

0 comments on commit fc0af9e

Please sign in to comment.