export empty object if Instabug native module is not defined

This commit is contained in:
Roman Volosovskyi 2017-05-18 13:29:26 +03:00
parent a733f8ad5d
commit 4080baa750
1 changed files with 4 additions and 0 deletions

View File

@ -2,6 +2,7 @@ import {NativeModules, NativeAppEventEmitter, Platform} from 'react-native';
let {Instabug} = NativeModules;
if(Instabug) {
/**
* Instabug
* @exports Instabug
@ -614,3 +615,6 @@ module.exports = {
messagesNotificationAndOthers: Instabug.messagesNotificationAndOthers
}
};
} else {
module.exports = {};
}