mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-24 04:24:52 +08:00
[utils] Allow _native to return statics
This commit is contained in:
@@ -351,9 +351,13 @@ export function nativeWithApp(appName: string, NativeModule: Object) {
|
||||
|
||||
for (let i = 0, len = methods.length; i < len; i++) {
|
||||
const method = methods[i];
|
||||
native[method] = (...args) => {
|
||||
return NativeModule[method](...[appName, ...args]);
|
||||
};
|
||||
if (isFunction(NativeModule[method])) {
|
||||
native[method] = (...args) => {
|
||||
return NativeModule[method](...[appName, ...args]);
|
||||
};
|
||||
} else {
|
||||
native[method] = NativeModule[method];
|
||||
}
|
||||
}
|
||||
|
||||
return native;
|
||||
|
||||
Reference in New Issue
Block a user