mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-10-08 09:15:15 +08:00
v10.5.3
This commit is contained in:
13
src/core.ts
13
src/core.ts
@@ -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()
|
||||
|
Reference in New Issue
Block a user