Skip to content

Commit b038dbc

Browse files
committed
fix(app): add misconfiguration warning for missing native module
1 parent d55e891 commit b038dbc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/app/lib/internal/RNFBNativeEventEmitter.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,13 @@ import { getReactNativeModule } from './nativeModule';
2020

2121
class RNFBNativeEventEmitter extends NativeEventEmitter {
2222
constructor() {
23-
super(getReactNativeModule('RNFBAppModule'));
23+
const RNFBAppModule = getReactNativeModule('RNFBAppModule');
24+
if (!RNFBAppModule) {
25+
throw new Error(
26+
'Native module RNFBAppModule not found. Re-check module install, linking, configuration, build and install steps.',
27+
);
28+
}
29+
super(RNFBAppModule);
2430
this.ready = false;
2531
}
2632

0 commit comments

Comments
 (0)