[internals] check _NATIVE_DISABLED before throwing native not found error
This commit is contained in:
parent
8abc544ac3
commit
961112a108
|
@ -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));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue