1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-10-08 09:15:15 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
sunnylqm
2024-04-23 00:15:13 +08:00
parent 5996a7aa75
commit e9e67b011c
6 changed files with 20 additions and 16 deletions

View File

@@ -1,5 +1,5 @@
import { NativeEventEmitter, NativeModules, Platform } from 'react-native';
import { log } from './utils';
import { EmptyModule, log } from './utils';
const {
version: v,
} = require('react-native/Libraries/Core/ReactNativeVersion');
@@ -8,17 +8,6 @@ const isTurboModuleEnabled =
// @ts-expect-error
global.__turboModuleProxy != null;
const noop = () => {};
class EmptyModule {
constructor() {
return new Proxy(this, {
get() {
return noop;
},
});
}
}
export const PushyModule =
Platform.OS === 'web'
? new EmptyModule()