From e452f514a324c63522fffdf08c818a29b5c409b9 Mon Sep 17 00:00:00 2001 From: Elliot Hesp Date: Thu, 30 Nov 2017 11:27:59 +0000 Subject: [PATCH] [utils] Allow _native to return statics --- lib/utils/index.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/utils/index.js b/lib/utils/index.js index 6f619e4e..4c1697d8 100644 --- a/lib/utils/index.js +++ b/lib/utils/index.js @@ -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;