[internals] check _NATIVE_DISABLED before throwing native not found error

This commit is contained in:
Salakar 2017-11-28 12:41:50 +00:00
parent 8abc544ac3
commit 961112a108
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ export default class ModuleBase {
// modules are now optionally part of build // modules are now optionally part of build
const nativeModule = NativeModules[this.constructor._NATIVE_MODULE]; 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)); throw new Error(INTERNALS.STRINGS.ERROR_MISSING_MODULE(this.constructor._NAMESPACE, this.constructor._NATIVE_MODULE));
} }