From 95048281a03a6fa4135a97c886a642877a277b95 Mon Sep 17 00:00:00 2001 From: sunnylqm Date: Thu, 6 Mar 2025 22:32:24 +0800 Subject: [PATCH] fix 0.77+ bridgeless detection --- package.json | 2 +- src/core.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index bfb40ac..2cc37f4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-update", - "version": "10.26.0", + "version": "10.26.1", "description": "react-native hot update", "main": "src/index", "scripts": { diff --git a/src/core.ts b/src/core.ts index a86ee7f..7ebe8b0 100644 --- a/src/core.ts +++ b/src/core.ts @@ -4,7 +4,9 @@ const { version: v, } = require('react-native/Libraries/Core/ReactNativeVersion'); const RNVersion = `${v.major}.${v.minor}.${v.patch}`; -const isTurboModuleEnabled = (global as any).__turboModuleProxy != null; +const isTurboModuleEnabled = + // https://github.com/facebook/react-native/pull/48362 + (global as any).__turboModuleProxy || (global as any).RN$Bridgeless; export const PushyModule = Platform.OS === 'web'