From 961112a108981f7f115bef03b81d61491fb2978c Mon Sep 17 00:00:00 2001 From: Salakar Date: Tue, 28 Nov 2017 12:41:50 +0000 Subject: [PATCH] [internals] check _NATIVE_DISABLED before throwing native not found error --- lib/utils/ModuleBase.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/ModuleBase.js b/lib/utils/ModuleBase.js index 5bed12a6..0f89825a 100644 --- a/lib/utils/ModuleBase.js +++ b/lib/utils/ModuleBase.js @@ -74,7 +74,7 @@ export default class ModuleBase { // modules are now optionally part of build const nativeModule = NativeModules[this.constructor._NATIVE_MODULE]; - if (!nativeModule) { + if (!nativeModule && !this.constructor._NATIVE_DISABLED) { throw new Error(INTERNALS.STRINGS.ERROR_MISSING_MODULE(this.constructor._NAMESPACE, this.constructor._NATIVE_MODULE)); }