From 316225156bc4e4bcab7519fa935abcfbef6bf39c Mon Sep 17 00:00:00 2001 From: louiszawadzki Date: Wed, 25 Oct 2023 14:52:28 +0200 Subject: [PATCH] Use turbomodules for telemetry --- .../src/__utils__/formatAllowedHosts.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-native-webview/src/__utils__/formatAllowedHosts.ts b/packages/react-native-webview/src/__utils__/formatAllowedHosts.ts index 9c7971400..25142ec89 100644 --- a/packages/react-native-webview/src/__utils__/formatAllowedHosts.ts +++ b/packages/react-native-webview/src/__utils__/formatAllowedHosts.ts @@ -3,14 +3,14 @@ * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2016-Present Datadog, Inc. */ -import { NativeModules } from 'react-native'; +import { NativeDdSdk } from '../NativeDdSdk'; export function formatAllowedHosts(allowedHosts?: string[]): string { try { return `'${JSON.stringify(allowedHosts)}'`; } catch (e: any) { - if (NativeModules.DdSdk && NativeModules.DdSdk.telemetryError) { - NativeModules.DdSdk.telemetryError( + if (NativeDdSdk) { + NativeDdSdk.telemetryError( getErrorMessage(e), getErrorStackTrace(e), 'AllowedHostsError'