Skip to content

Commit 8c032ad

Browse files
committed
Fix legacy issue?
1 parent 389e947 commit 8c032ad

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

packages/node/src/integrations/anr/legacy.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { getClient } from '@sentry/core';
2-
import { Anr } from '.';
32
import type { NodeClient } from '../../client';
3+
import { anrIntegration } from './index';
44

55
// TODO (v8): Remove this entire file and the `enableAnrDetection` export
66

@@ -26,8 +26,7 @@ interface LegacyOptions {
2626
*/
2727
export function enableAnrDetection(options: Partial<LegacyOptions>): Promise<void> {
2828
const client = getClient() as NodeClient;
29-
// eslint-disable-next-line deprecation/deprecation
30-
const integration = new Anr(options);
31-
integration.setup(client);
29+
const integration = anrIntegration(options);
30+
integration.setup?.(client);
3231
return Promise.resolve();
3332
}

0 commit comments

Comments
 (0)