From 950410b06f85431ae9ea1c0a29ef8008bb28bb52 Mon Sep 17 00:00:00 2001 From: Gabriel Donadel Dall'Agnol Date: Tue, 27 Feb 2024 09:33:09 -0800 Subject: [PATCH] fix: update nativeInterface default export to support bridgeless mode (#717) --- src/internal/nativeInterface.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/internal/nativeInterface.ts b/src/internal/nativeInterface.ts index c0d9ec43..8b514f48 100644 --- a/src/internal/nativeInterface.ts +++ b/src/internal/nativeInterface.ts @@ -28,8 +28,7 @@ If none of these fix the issue, please open an issue on the Github repository: h * JavaScript code and the tests */ let nativeEventEmitter: NativeEventEmitter | null = null; -export default { - ...RNCNetInfo, +const nativeInterface = Object.assign(RNCNetInfo, { get eventEmitter(): NativeEventEmitter { if (!nativeEventEmitter) { // eslint-disable-next-line @typescript-eslint/ban-ts-comment @@ -40,4 +39,5 @@ export default { /// @ts-ignore return nativeEventEmitter; }, -}; +}); +export default nativeInterface;